Struct pmu_x86::stat::PerformanceCounters
source · pub struct PerformanceCounters { /* private fields */ }
Implementations§
source§impl PerformanceCounters
impl PerformanceCounters
sourcepub fn new() -> Result<PerformanceCounters, &'static str>
pub fn new() -> Result<PerformanceCounters, &'static str>
Initialize seven performance monitoring counters. They will measure:
- Instructions retired
- Core cycles
- Reference cycles
- LLC references
- LLC misses
- Branch instructions retired
- Branch misses retired
sourcepub fn end(self) -> Result<PMUResults, &'static str>
pub fn end(self) -> Result<PMUResults, &'static str>
Stop the counters and return the counter values.
The PerformanceCounters
object is consumed since the counters are freed in this function
and should not be accessed again.
Auto Trait Implementations§
impl RefUnwindSafe for PerformanceCounters
impl Send for PerformanceCounters
impl Sync for PerformanceCounters
impl Unpin for PerformanceCounters
impl UnwindSafe for PerformanceCounters
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