Struct aya::programs::TracePoint
source · [−]pub struct TracePoint { /* private fields */ }
Expand description
A program that can be attached at a pre-defined kernel trace point.
The kernel provides a set of pre-defined trace points that eBPF programs can
be attached to. See /sys/kernel/debug/tracing/events
for a list of which
events can be traced.
Minimum kernel version
The minimum kernel version required to use this feature is 4.7.
Examples
use std::convert::TryInto;
use aya::programs::TracePoint;
let prog: &mut TracePoint = bpf.program_mut("trace_context_switch").unwrap().try_into()?;
prog.load()?;
prog.attach("sched", "sched_switch")?;
Implementations
sourceimpl TracePoint
impl TracePoint
sourcepub fn load(&mut self) -> Result<(), ProgramError>
pub fn load(&mut self) -> Result<(), ProgramError>
Loads the program inside the kernel.
See also Program::load
.
Trait Implementations
sourceimpl Debug for TracePoint
impl Debug for TracePoint
sourceimpl ProgramFd for TracePoint
impl ProgramFd for TracePoint
sourceimpl ProgramFd for &mut TracePoint
impl ProgramFd for &mut TracePoint
sourceimpl<'a> TryFrom<&'a Program> for &'a TracePoint
impl<'a> TryFrom<&'a Program> for &'a TracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(program: &'a Program) -> Result<&'a TracePoint, ProgramError>
fn try_from(program: &'a Program) -> Result<&'a TracePoint, ProgramError>
Performs the conversion.
sourceimpl<'a> TryFrom<&'a mut Program> for &'a mut TracePoint
impl<'a> TryFrom<&'a mut Program> for &'a mut TracePoint
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
sourcefn try_from(
program: &'a mut Program
) -> Result<&'a mut TracePoint, ProgramError>
fn try_from(
program: &'a mut Program
) -> Result<&'a mut TracePoint, ProgramError>
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for TracePoint
impl !Send for TracePoint
impl !Sync for TracePoint
impl Unpin for TracePoint
impl !UnwindSafe for TracePoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more