pub struct BtfTracePoint { /* private fields */ }
Expand description

Marks a function as a BTF-enabled raw tracepoint eBPF 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 5.5.

Examples

use aya::{Bpf, programs::BtfTracePoint, BtfError, Btf};
use std::convert::TryInto;

let btf = Btf::from_sys_fs()?;
let program: &mut BtfTracePoint = bpf.program_mut("sched_process_fork").unwrap().try_into()?;
program.load("sched_process_fork", &btf)?;
program.attach()?;

Implementations

Loads the program inside the kernel.

See also Program::load.

Arguments
  • tracepoint - full name of the tracepoint that we should attach to
  • btf - btf information for the target system

Attaches the program.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the RawFd of the program if it has been loaded, or None

Returns the RawFd of the program if it has been loaded, or None

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.