pub enum Software {
CpuClock,
TaskClock,
PageFault,
MinorPageFault,
MajorPageFault,
EmuFault,
AlignFault,
CtxSwitch,
CgroupSwitch,
Dummy,
BpfOutput,
CpuMigration,
}
Expand description
Software events provided by the kernel.
Variants§
CpuClock
This reports the CPU clock, a high-resolution per-CPU timer.
TaskClock
This reports a clock count specific to the task that is running (in nanoseconds).
PageFault
The number of page faults.
MinorPageFault
The number of minor page faults. These did not require disk I/O to handle.
MajorPageFault
The number of major page faults. These required disk I/O to handle.
EmuFault
The number of emulation faults.
The kernel sometimes traps on unimplemented instructions and emulates them for user space. This can negatively impact performance.
AlignFault
The number of alignment faults.
These happen when unaligned memory accesses happen; the kernel can handle these but it reduces performance. This happens only on some architectures (never on x86).
CtxSwitch
This number of context switches.
CgroupSwitch
This counts context switches to a task in a different cgroup.
In other words, if the next task is in the same cgroup, it won’t count the switch.
Since linux-5.13
: https://github.com/torvalds/linux/commit/d0d1dd628527c77db2391ce0293c1ed344b2365f
Dummy
A placeholder event that counts nothing.
Informational sample record types such as Mmap
or Comm
must be associated with an active event.
This dummy event allows gathering such records without requiring a counting event.
BpfOutput
This is used to generate raw sample data from BPF.
BPF programs can write to this event using bpf_perf_event_output
helper.
Since linux-4.4
: https://github.com/torvalds/linux/commit/a43eec304259a6c637f4014a6d4767159b6a3aa3
CpuMigration
The number of times the process has migrated to a new CPU.