darwin-kperf-events
Apple Silicon performance-monitoring event definitions
IntroductionCopy link to this section
darwin-kperf-events defines the hardware events used by darwin-kperf and its Criterion integration. It contains generated event definitions and metadata for Apple Silicon chips, including event names, descriptions, and counter availability.
Published release: 0.1.1 on crates.io.
InstallationCopy link to this section
cargo add darwin-kperf-eventsResolve an eventCopy link to this section
Use the Event enum to identify an event and Event::on to resolve it for a particular Cpu. A resolved event exposes chip-specific metadata through EventInfo. Availability varies by chip, so check the resolution result before configuring a counter.
The definitions are generated from Apple's performance-counter event databases in /usr/share/kpep/. The crate uses no_std; counter configuration and sampling are provided by darwin-kperf.
See the API documentation for the event list and the source for the generated definitions.