[][src]Function perf_event_open_sys::perf_event_open

pub unsafe fn perf_event_open(
    attrs: *mut perf_event_attr,
    pid: pid_t,
    cpu: c_int,
    group_fd: c_int,
    flags: c_ulong
) -> c_int

The perf_event_open system call.

See the perf_event_open(2) man page for details.

On error, this returns a negated raw OS error value. The C errno value is not changed.

Note: The attrs argument needs to be a *mut because if the size field is too small or too large, the kernel writes the size it was expecing back into that field. It might do other things as well.