Skip to main content

perf_event_open

Function perf_event_open 

Source
pub fn perf_event_open(
    attr: &PerfEventAttr,
    scope: PerfEventScope<'_>,
    group_leader: Option<BorrowedFd<'_>>,
    flags: PerfEventOpenFlags,
) -> Result<PerfEvent, Errno>
Expand description

Ouvre un compteur/échantillonneur de performance.

FD_CLOEXEC est toujours posé. Point d’accroche canonique des programmes eBPF de tracing (via perf_event_set_bpf_program).

§Errors

  • [Errno::EACCES] / [Errno::EPERM] : privilège / perf_event_paranoid.
  • [Errno::EINVAL] : attributs incohérents.
  • [Errno::ENOENT] : type/config inconnu.