#[repr(i32)]pub enum Counter {
Show 21 variants
UnknownCounter = 0,
SwCpuClock = 1,
SwPageFaults = 2,
SwTaskClock = 3,
SwContextSwitches = 4,
SwCpuMigrations = 5,
SwPageFaultsMin = 6,
SwPageFaultsMaj = 7,
SwAlignmentFaults = 8,
SwEmulationFaults = 9,
SwDummy = 20,
HwCpuCycles = 10,
HwInstructions = 11,
HwCacheReferences = 12,
HwCacheMisses = 13,
HwBranchInstructions = 14,
HwBranchMisses = 15,
HwBusCycles = 16,
HwStalledCyclesFrontend = 17,
HwStalledCyclesBackend = 18,
HwRefCpuCycles = 19,
}
Expand description
Builtin counter names from the uapi header. Commented with their perf tool aliases. TODO(rsavitski): consider generating enums for cache events (should be finite), and generally make this list as extensive as possible. Excluding things like dynamic PMUs since those don’t fit into a static enum. Next id: 21
Variants§
UnknownCounter = 0
SwCpuClock = 1
cpu-clock
SwPageFaults = 2
page-faults, faults
SwTaskClock = 3
task-clock
SwContextSwitches = 4
context-switches, cs
SwCpuMigrations = 5
cpu-migrations, migrations
SwPageFaultsMin = 6
minor-faults
SwPageFaultsMaj = 7
major-faults
SwAlignmentFaults = 8
alignment-faults
SwEmulationFaults = 9
emulation-faults
SwDummy = 20
dummy
HwCpuCycles = 10
cpu-cycles, cycles
HwInstructions = 11
instructions
HwCacheReferences = 12
cache-references
HwCacheMisses = 13
cache-misses
HwBranchInstructions = 14
branch-instructions, branches
HwBranchMisses = 15
branch-misses
HwBusCycles = 16
bus-cycles
HwStalledCyclesFrontend = 17
stalled-cycles-frontend, idle-cycles-frontend
HwStalledCyclesBackend = 18
stalled-cycles-backend, idle-cycles-backend
HwRefCpuCycles = 19
ref-cycles
Implementations§
Trait Implementations§
Source§impl Ord for Counter
impl Ord for Counter
Source§impl PartialOrd for Counter
impl PartialOrd for Counter
impl Copy for Counter
impl Eq for Counter
impl StructuralPartialEq for Counter
Auto Trait Implementations§
impl Freeze for Counter
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)