Skip to main content

Crate darwin_kperf_events

Crate darwin_kperf_events 

Source
Expand description

Hardware performance counter events for Apple Silicon.

This crate is auto-generated by darwin-kperf-codegen from the PMC database plists in /usr/share/kpep/. Do not edit by hand.

§Types

  • Event: chip-agnostic event enum covering M1 through M5. Use Event::on to resolve an event for a specific Cpu, which checks availability and returns the chip-specific metadata.
  • Cpu: Apple Silicon chip generation, identified by the kpep_db.name field at runtime.
  • EventInfo: trait providing event metadata (name, description, counter mask, etc.), implemented by per-chip enums (M1Event, M2Event, …) and by ResolvedEvent.
  • ResolvedEvent: an Event resolved for a specific Cpu, returned by Event::on.

Structs§

ResolvedEvent
A resolved view of an Event on a specific Cpu.

Enums§

Cpu
Apple Silicon chip generation, as identified by kpep_db.name.
Event
A hardware performance counter event from Apple’s kpep database.
M1Event
Hardware performance counter events available on M1.
M2Event
Hardware performance counter events available on M2.
M3Event
Hardware performance counter events available on M3.
M4Event
Hardware performance counter events available on M4.
M5Event
Hardware performance counter events available on M5.

Traits§

EventInfo
Metadata for a hardware performance counter event on a specific chip.