Module perf_event::events

source ·
Expand description

Events we can monitor or count.

There are a few 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.

  • Breakpoint events correspond to hardware breakpoints. They can count read/write accesses to an address as well as execution of an instruction address.

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!

Re-exports§

  • pub use self::cache::WhichCache;
    Deprecated

Modules§

  • Non-io errors emitted when constructing events.
  • Events specific to x86 CPUs.

Structs§

  • Memory access mask for a hardware data breakpoint.
  • A cache event.
  • A cache whose events we would like to count.
  • What sort of cache operation we would like to observe.
  • What sort of cache result we’re interested in observing.
  • An event exposed as a dynamic PMU via the sysfs filesystem.
  • Builder for a Dynamic event.
  • Hardware counters.
  • Kernel-space probe event.
  • A raw perf counter for the current CPU.
  • Software counters, implemented by the kernel.
  • Kernel tracepoint event.
  • User-space probe event.

Enums§

Traits§

  • An event that we can monitor or count.
  • Trait for owned event data.