mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 12:32:31 -04:00
perf test: Switch cycles event to cpu-cycles
Without a PMU perf matches an event against any PMU with the event. Unfortunately some PMU drivers advertise a "cycles" event which is typically just a core event. As tests assume a core event, switch to use "cpu-cycles" that avoids the overloaded "cycles" event on troublesome PMUs and is so far not overloaded. Note, on x86 this changes a legacy event into a sysfs one. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -704,7 +704,7 @@ static int do_test_code_reading(bool try_kcore)
|
||||
struct map *map;
|
||||
bool have_vmlinux, have_kcore;
|
||||
struct dso *dso;
|
||||
const char *events[] = { "cycles", "cycles:u", "cpu-clock", "cpu-clock:u", NULL };
|
||||
const char *events[] = { "cpu-cycles", "cpu-cycles:u", "cpu-clock", "cpu-clock:u", NULL };
|
||||
int evidx = 0;
|
||||
struct perf_env host_env;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user