Skip to content

Commit

Permalink
Merge pull request #1217 from devnexen/scxtop_bus_cpu_cycles
Browse files Browse the repository at this point in the history
scxtop: proposing to add bus-cycles event.
  • Loading branch information
hodgesds authored Jan 18, 2025
2 parents 8776d1b + 96828f0 commit e864f19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/scxtop/src/perf_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ impl PerfEvent {
"stalled-cycles-frontend".to_string(),
0,
));
avail_events.push(PerfEvent::new(
"hw".to_string(),
"bus-cycles".to_string(),
0,
));

avail_events
}
Expand Down Expand Up @@ -229,6 +234,9 @@ impl PerfEvent {
"stalled-cycles-frontend" => {
attrs.config = perf::bindings::PERF_COUNT_HW_STALLED_CYCLES_FRONTEND as u64;
}
"bus-cycles" | "bus_cycles" => {
attrs.config = perf::bindings::PERF_COUNT_HW_BUS_CYCLES as u64;
}
_ => {
return Err(anyhow!("unknown event"));
}
Expand Down

0 comments on commit e864f19

Please sign in to comment.