Skip to content

Commit

Permalink
linux_perf_event: do not exclude_idle on aarch64
Browse files Browse the repository at this point in the history
Commit 93f19d3
added `exclude_idle = 1` to `linux_perf_event`.
However, as reported in
scylladb/scylladb#19227 (comment),
`exclude_idle` is not supported on ARM platforms.

This change skips setting `exclude_idle` on aarch64
assuming it is initialized to 0 as all other unset bitfields
in `perf_event_attr`.

Signed-off-by: Benny Halevy <[email protected]>
  • Loading branch information
bhalevy committed Jun 14, 2024
1 parent d7bd2e7 commit 89ce5f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/perf/linux_perf_event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ linux_perf_event::user_instructions_retired() {
.disabled = 1,
.exclude_kernel = 1,
.exclude_hv = 1,
#if !defined(__aarch64__)
.exclude_idle = 1,
#endif
}, 0, -1, -1, 0);
}

Expand All @@ -103,6 +105,8 @@ linux_perf_event::user_cpu_cycles_retired() {
.disabled = 1,
.exclude_kernel = 1,
.exclude_hv = 1,
#if !defined(__aarch64__)
.exclude_idle = 1,
#endif
}, 0, -1, -1, 0);
}

0 comments on commit 89ce5f7

Please sign in to comment.