pub enum HardwareEventType {
    CPUCycles,
    Instructions,
    CacheReferences,
    CacheMisses,
    BranchInstructions,
    BranchMisses,
    BusCycles,
    StalledCyclesFrontend,
    StalledCyclesBackend,
    RefCPUCycles,
}

Variants

CPUCycles

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.

CacheReferences

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.

CacheMisses

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

BranchInstructions

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

BranchMisses

Mispredicted branch instructions.

BusCycles

Bus cycles, which can be different from total cycles.

StalledCyclesFrontend

Stalled cycles during issue. (Since Linux 3.0)

StalledCyclesBackend

Stalled cycles during retirement. (Since Linux 3.0)

RefCPUCycles

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.