diff options
| author | Dennis Kobert <dennis@kobert.dev> | 2025-03-08 21:11:02 +0100 |
|---|---|---|
| committer | Dennis Kobert <dennis@kobert.dev> | 2025-03-08 21:11:02 +0100 |
| commit | 7b2ec191751489157a9e3193b8aeaabd72fae14a (patch) | |
| tree | 8da4fdb399d439e88b9756334b29a55a654150d6 /perf-event/src | |
| parent | b4eae244826a0fb8907ef50c8ef9a38da40b719d (diff) | |
Add raw event type
Diffstat (limited to 'perf-event/src')
| -rw-r--r-- | perf-event/src/events.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perf-event/src/events.rs b/perf-event/src/events.rs index d79b749..a46f6b8 100644 --- a/perf-event/src/events.rs +++ b/perf-event/src/events.rs @@ -47,6 +47,9 @@ pub enum Event { #[allow(missing_docs)] Cache(Cache), + + #[allow(missing_docs)] + Raw(u32), } impl Event { @@ -55,6 +58,7 @@ impl Event { Event::Hardware(_) => bindings::PERF_TYPE_HARDWARE, Event::Software(_) => bindings::PERF_TYPE_SOFTWARE, Event::Cache(_) => bindings::PERF_TYPE_HW_CACHE, + Event::Raw(ty) => *ty, } } @@ -62,6 +66,7 @@ impl Event { match self { Event::Hardware(hw) => hw as _, Event::Software(sw) => sw as _, + Event::Raw(_) => 0, Event::Cache(cache) => cache.as_config(), } } |
