pub struct MapManager<'ctx> { /* private fields */ }Implementations§
Source§impl<'ctx> MapManager<'ctx>
impl<'ctx> MapManager<'ctx>
pub fn new(context: &'ctx Context) -> Self
pub fn create_map_definition( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, map_type: BpfMapType, max_entries: u64, key_type: SizedType, value_type: SizedType, ) -> Result<()>
pub fn get_map( &self, module: &Module<'ctx>, name: &str, ) -> Result<PointerValue<'ctx>>
pub fn create_ringbuf_map( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, ringbuf_size: u64, ) -> Result<()>
Sourcepub fn create_perf_event_array_map(
&mut self,
module: &Module<'ctx>,
di_builder: &DebugInfoBuilder<'ctx>,
compile_unit: &DICompileUnit<'ctx>,
name: &str,
) -> Result<()>
pub fn create_perf_event_array_map( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, ) -> Result<()>
Create PerfEventArray map for event output (fallback when RingBuf not supported)
Sourcepub fn create_proc_module_offsets_map(
&mut self,
module: &Module<'ctx>,
di_builder: &DebugInfoBuilder<'ctx>,
compile_unit: &DICompileUnit<'ctx>,
name: &str,
max_entries: u64,
) -> Result<()>
pub fn create_proc_module_offsets_map( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, max_entries: u64, ) -> Result<()>
Create the per-(pid,module) section offsets map used for ASLR address calculation
pub fn create_event_loss_counter_map( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, max_entries: u64, ) -> Result<()>
Sourcepub fn get_ringbuf_map(
&self,
module: &Module<'ctx>,
name: &str,
) -> Result<PointerValue<'ctx>>
pub fn get_ringbuf_map( &self, module: &Module<'ctx>, name: &str, ) -> Result<PointerValue<'ctx>>
Get ringbuf map by name
Sourcepub fn get_perf_map(
&self,
module: &Module<'ctx>,
name: &str,
) -> Result<PointerValue<'ctx>>
pub fn get_perf_map( &self, module: &Module<'ctx>, name: &str, ) -> Result<PointerValue<'ctx>>
Get a perf event array map by name
Sourcepub fn create_percpu_array_map(
&mut self,
module: &Module<'ctx>,
di_builder: &DebugInfoBuilder<'ctx>,
compile_unit: &DICompileUnit<'ctx>,
name: &str,
max_entries: u64,
value_size_bytes: u64,
) -> Result<()>
pub fn create_percpu_array_map( &mut self, module: &Module<'ctx>, di_builder: &DebugInfoBuilder<'ctx>, compile_unit: &DICompileUnit<'ctx>, name: &str, max_entries: u64, value_size_bytes: u64, ) -> Result<()>
Create a Per-CPU Array map (key=u32, value arbitrary size)
Auto Trait Implementations§
impl<'ctx> Freeze for MapManager<'ctx>
impl<'ctx> RefUnwindSafe for MapManager<'ctx>
impl<'ctx> !Send for MapManager<'ctx>
impl<'ctx> !Sync for MapManager<'ctx>
impl<'ctx> Unpin for MapManager<'ctx>
impl<'ctx> UnwindSafe for MapManager<'ctx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more