diff options
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(), } } |
