Module perf_event::events
source · Expand description
Events we can monitor or count.
There are three general categories of event:
-
Hardware
events are counted by the processor itself. This includes things like clock cycles, instructions retired, and cache and branch prediction statistics. -
Cache
events, also counted by the processor, offer a more detailed view of the processor’s cache counters. You can select which level of the cache hierarchy to observe, discriminate between data and instruction caches, and so on. -
Software
events are counted by the kernel. This includes things like context switches, page faults, and so on.
The Event
type is just an enum with a variant for each of the above types,
which all implement Into<Event>
.
Linux supports many more kinds of events than this module covers, including events specific to particular make and model of processor, and events that are dynamically registered by drivers and kernel modules. If something you want is missing, think about the best API to expose it, and submit a pull request!