Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Add support for USDT probes #313

Open
nbaksalyar opened this issue Apr 7, 2022 · 0 comments
Open

Add support for USDT probes #313

nbaksalyar opened this issue Apr 7, 2022 · 0 comments

Comments

@nbaksalyar
Copy link
Contributor

As discussed in #307, there should be public API to use USDT probes.

The attach_usdt signature can mirror the uprobe API (because internally USDTs are simply uprobes with some extra features and publicly available metadata):

pub fn attach_usdt(
  &mut self,
  probe_name: &str,
  offset: u64,
  target: &str,
  pid: Option<pid_t>,
)

This function should read probe addresses from the target ELF header (similarly to how it's done in redbpf::symbols::ElfSymbols).

We will also needs a function to enable these probes -- either automatically or manually -- as many USDT probes require to update dynamic reference counters (called semaphores) to work properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant