Struct bcc::Uprobe[][src]

pub struct Uprobe { /* fields omitted */ }

A Uprobe is used to configure and then attach a uprobe to a userspace function on entry into that function. Must be attached to a BPF struct to be useful.

Implementations

impl Uprobe[src]

pub fn new() -> Self[src]

Create a new probe with the defaults. Further initialization is required before attaching.

pub fn handler(self, name: &str) -> Self[src]

Specify the name of the probe handler within the BPF code. This is a required item.

pub fn binary<T: AsRef<Path>>(self, path: T) -> Self[src]

Specify the path to the binary to probe. This is a required item.

pub fn symbol(self, symbol: &str) -> Self[src]

Specify the symbol to probe. This is optional.

Typically required when not specifying the symbol address directly via address.

pub fn address(self, addr: u64) -> Self[src]

Specify the symbol address to probe. This is optional.

pub fn pid(self, pid: Option<pid_t>) -> Self[src]

Specify a pid to probe. This is optional.

pub fn ref_ctr_offset(self, offset: u32) -> Self[src]

Specify reference counter offset

pub fn attach(self, bpf: &mut BPF) -> Result<(), BccError>[src]

Consumes the probe and attaches it to the BPF struct. May return an error if there is a incomplete configuration or error while loading or attaching the probe.

Trait Implementations

impl Default for Uprobe[src]

Auto Trait Implementations

impl RefUnwindSafe for Uprobe

impl Send for Uprobe

impl Sync for Uprobe

impl Unpin for Uprobe

impl UnwindSafe for Uprobe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.