[−][src]Crate perf_event_open_sys
Direct, unsafe bindings for Linux perf_event_open
and friends.
Linux's perf_event_open
system call provides access to the processor's
performance measurement counters (things like instructions retired, cache
misses, and so on), kernel counters (context switches, page faults), and
many other sources of performance information.
The Linux standard C library does not provide a binding for
perf_event_open
or its associated types and constants, so you can't get
this function from the libc
crate, as you would any other system call.
Rust analogues to the C types and constants from <linux/perf_event.h>
and
<linux/hw_breakpoint.h>
, generated with bindgen
, are available in the
bindings
module.
There are several ioctls for use with perf_event_open
file descriptors;
see the ioctls
module for those.
Kernel versions
The bindings in this crate are generated from structures compatible back to
Linux 4.1: the perf_event_attr
type is 112 bytes long, which is
PERF_ATTR_SIZE_VER5
. If you need features available only in newer versions
of the type, please file an issue.
Modules
bindings | Types and constants used with |
ioctls | Ioctls for use with |
Functions
perf_event_open⚠ | The |