#[repr(transparent)]pub struct Hardware(pub u64);Expand description
Hardware counters.
These are counters implemented by the processor itself. Such counters vary from one architecture to the next, and even different models within a particular architecture will often change the way they expose this data. This is a selection of portable names for values that can be obtained on a wide variety of systems.
Each variant of this enum corresponds to a particular PERF_COUNT_HW_…
value supported by the perf_event_open system call.
Tuple Fields§
§0: u64Implementations§
Source§impl Hardware
impl Hardware
Sourcepub const CPU_CYCLES: Self
pub const CPU_CYCLES: Self
Total cycles.
Sourcepub const INSTRUCTIONS: Self
pub const INSTRUCTIONS: Self
Retired instructions.
Sourcepub const CACHE_REFERENCES: Self
pub const CACHE_REFERENCES: Self
Cache accesses.
Sourcepub const CACHE_MISSES: Self
pub const CACHE_MISSES: Self
Cache misses.
Sourcepub const BRANCH_INSTRUCTIONS: Self
pub const BRANCH_INSTRUCTIONS: Self
Retired branch instructions.
Sourcepub const BRANCH_MISSES: Self
pub const BRANCH_MISSES: Self
Mispredicted branch instructions.
Sourcepub const BUS_CYCLES: Self
pub const BUS_CYCLES: Self
Bus cycles.
Sourcepub const STALLED_CYCLES_FRONTEND: Self
pub const STALLED_CYCLES_FRONTEND: Self
Stalled cycles during issue.
Sourcepub const STALLED_CYCLES_BACKEND: Self
pub const STALLED_CYCLES_BACKEND: Self
Stalled cycles during retirement.
Sourcepub const REF_CPU_CYCLES: Self
pub const REF_CPU_CYCLES: Self
Total cycles, independent of frequency scaling.
Trait Implementations§
Source§impl Event for Hardware
impl Event for Hardware
Source§fn update_attrs(self, attr: &mut perf_event_attr)
fn update_attrs(self, attr: &mut perf_event_attr)
Update the
perf_event_attr struct so that it will record the
requested event. Read moreSource§fn update_attrs_with_data(
self,
attr: &mut perf_event_attr,
) -> Option<Arc<dyn EventData>>
fn update_attrs_with_data( self, attr: &mut perf_event_attr, ) -> Option<Arc<dyn EventData>>
Update the
perf_event_attr struct so that it will record the
requested event. Read moreimpl Copy for Hardware
impl Eq for Hardware
impl StructuralPartialEq for Hardware
Auto Trait Implementations§
impl Freeze for Hardware
impl RefUnwindSafe for Hardware
impl Send for Hardware
impl Sync for Hardware
impl Unpin for Hardware
impl UnwindSafe for Hardware
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