[−][src]Module perf_event::events
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. -
Software
events are counted by the kernel. This includes things like context switches, page faults, and so on. -
Cache
events 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.
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!
Structs
Cache | A cache event. |
Enums
CacheOp | What sort of cache operation we would like to observe. |
CacheResult | What sort of cache result we're interested in observing. |
Event | Any sort of event. This is a sum of the |
Hardware | Hardware counters. |
Software | Software counters, implemented by the kernel. |
WhichCache | A cache whose events we would like to count. |