aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/tests/openat-syscall-all-cpus.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-06-26 11:29:09 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-26 11:11:26 -0300
commit1ac77e1ce8654ec94ada0c508d58ba80a4647fba (patch)
treeaf641ba0dc1fadca7bd3a729b17535aafe49e3de /tools/perf/tests/openat-syscall-all-cpus.c
parentperf tests: Add thread_map object tests (diff)
downloadwireguard-linux-1ac77e1ce8654ec94ada0c508d58ba80a4647fba.tar.xz
wireguard-linux-1ac77e1ce8654ec94ada0c508d58ba80a4647fba.zip
perf stat: Introduce perf_counts function
Introducing perf_counts function, that returns 'struct perf_counts_values' pointer for given cpu. Also moving perf_counts* structures into stat.h. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1435310967-14570-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/openat-syscall-all-cpus.c')
-rw-r--r--tools/perf/tests/openat-syscall-all-cpus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c
index b8d552b13950..e8d944fe1bd0 100644
--- a/tools/perf/tests/openat-syscall-all-cpus.c
+++ b/tools/perf/tests/openat-syscall-all-cpus.c
@@ -98,9 +98,9 @@ int test__openat_syscall_event_on_all_cpus(void)
}
expected = nr_openat_calls + cpu;
- if (evsel->counts->cpu[cpu].val != expected) {
+ if (perf_counts(evsel->counts, cpu)->val != expected) {
pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n",
- expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
+ expected, cpus->map[cpu], perf_counts(evsel->counts, cpu)->val);
err = -1;
}
}