pub struct BpfPerfEvent { /* private fields */ }Expand description
BPF performance event structure.
Implementations§
Source§impl BpfPerfEvent
impl BpfPerfEvent
Sourcepub fn new(args: PerfProbeArgs) -> Self
pub fn new(args: PerfProbeArgs) -> Self
Create a new BpfPerfEvent.
Sourcepub fn do_mmap(&mut self, start: usize, len: usize, offset: usize) -> Result<()>
pub fn do_mmap(&mut self, start: usize, len: usize, offset: usize) -> Result<()>
Bind the perf event to a mmap page.
Sourcepub fn write_event(&mut self, data: &[u8]) -> Result<()>
pub fn write_event(&mut self, data: &[u8]) -> Result<()>
Write a perf event to the mmap page. Only when the perf event is enabled, the event will be written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BpfPerfEvent
impl RefUnwindSafe for BpfPerfEvent
impl Send for BpfPerfEvent
impl Sync for BpfPerfEvent
impl Unpin for BpfPerfEvent
impl UnsafeUnpin for BpfPerfEvent
impl UnwindSafe for BpfPerfEvent
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> 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