diff options
| author | Dennis Kobert <dennis@kobert.dev> | 2025-03-09 15:21:58 +0100 |
|---|---|---|
| committer | Dennis Kobert <dennis@kobert.dev> | 2025-03-09 15:21:58 +0100 |
| commit | 7af8a52e2ff92518b8c737dfe74d9ed68d5f4943 (patch) | |
| tree | 3a5522a4bd5e4d2865de8a7f86d1f92a129c30c2 /perf-event/src | |
| parent | b720a1253fb8cc8a3ba3454014bad239233368c1 (diff) | |
Implement rapl abstraction
Diffstat (limited to 'perf-event/src')
| -rw-r--r-- | perf-event/src/events.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perf-event/src/events.rs b/perf-event/src/events.rs index a46f6b8..25eaa51 100644 --- a/perf-event/src/events.rs +++ b/perf-event/src/events.rs @@ -49,7 +49,7 @@ pub enum Event { Cache(Cache), #[allow(missing_docs)] - Raw(u32), + Raw(u32, u64), } impl Event { @@ -58,7 +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, + Event::Raw(ty, _) => *ty, } } @@ -66,7 +66,7 @@ impl Event { match self { Event::Hardware(hw) => hw as _, Event::Software(sw) => sw as _, - Event::Raw(_) => 0, + Event::Raw(_, config) => config, Event::Cache(cache) => cache.as_config(), } } |
