[][src]Enum perf_event::events::Hardware

#[repr(u32)]
pub enum Hardware {
    CPU_CYCLES,
    INSTRUCTIONS,
    CACHE_REFERENCES,
    CACHE_MISSES,
    BRANCH_INSTRUCTIONS,
    BRANCH_MISSES,
    BUS_CYCLES,
    STALLED_CYCLES_FRONTEND,
    STALLED_CYCLES_BACKEND,
    REF_CPU_CYCLES,
}

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.

Variants

CPU_CYCLES

Total cycles. Be wary of what happens during CPU frequency scaling.

INSTRUCTIONS

Retired instructions. Be careful, these can be affected by various issues, most notably hardware interrupt counts.

CACHE_REFERENCES

Cache accesses. Usually this indicates Last Level Cache accesses but this may vary depending on your CPU. This may include prefetches and coherency messages; again this depends on the design of your CPU.

CACHE_MISSES

Cache misses. Usually this indicates Last Level Cache misses; this is intended to be used in conjunction with the PERF_COUNT_HW_CACHE_REFERENCES event to calculate cache miss rates.

BRANCH_INSTRUCTIONS

Retired branch instructions. Prior to Linux 2.6.35, this used the wrong event on AMD processors.

BRANCH_MISSES

Mispredicted branch instructions.

BUS_CYCLES

Bus cycles, which can be different from total cycles.

STALLED_CYCLES_FRONTEND

Stalled cycles during issue. (since Linux 3.0)

STALLED_CYCLES_BACKEND

Stalled cycles during retirement. (since Linux 3.0)

REF_CPU_CYCLES

Total cycles; not affected by CPU frequency scaling. (since Linux 3.3)

Trait Implementations

impl Clone for Hardware[src]

impl Copy for Hardware[src]

impl Debug for Hardware[src]

impl Eq for Hardware[src]

impl From<Hardware> for Event[src]

impl PartialEq<Hardware> for Hardware[src]

impl StructuralEq for Hardware[src]

impl StructuralPartialEq for Hardware[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.