diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-06-26 11:29:11 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-06-26 11:20:02 -0300 |
commit | a6fa003855d38d53d90c1a8a5827102e62702334 (patch) | |
tree | da5d7f02f11c25c76060c8551bd8cf0dda6442ad /tools/perf/tests | |
parent | a8e02324dfe6bcafc15d02b790f33321ec4facb0 (diff) | |
download | op-kernel-dev-a6fa003855d38d53d90c1a8a5827102e62702334.zip op-kernel-dev-a6fa003855d38d53d90c1a8a5827102e62702334.tar.gz |
perf stat: Make stats work over the thread dimension
Now that we have space for thread dimension counts, let's store it.
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-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r-- | tools/perf/tests/openat-syscall-all-cpus.c | 6 | ||||
-rw-r--r-- | tools/perf/tests/openat-syscall.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c index e8d944fe..a572f87 100644 --- a/tools/perf/tests/openat-syscall-all-cpus.c +++ b/tools/perf/tests/openat-syscall-all-cpus.c @@ -78,7 +78,7 @@ int test__openat_syscall_event_on_all_cpus(void) * we use the auto allocation it will allocate just for 1 cpu, * as we start by cpu 0. */ - if (perf_evsel__alloc_counts(evsel, cpus->nr) < 0) { + if (perf_evsel__alloc_counts(evsel, cpus->nr, 1) < 0) { pr_debug("perf_evsel__alloc_counts(ncpus=%d)\n", cpus->nr); goto out_close_fd; } @@ -98,9 +98,9 @@ int test__openat_syscall_event_on_all_cpus(void) } expected = nr_openat_calls + cpu; - if (perf_counts(evsel->counts, cpu)->val != expected) { + if (perf_counts(evsel->counts, cpu, 0)->val != expected) { pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %" PRIu64 "\n", - expected, cpus->map[cpu], perf_counts(evsel->counts, cpu)->val); + expected, cpus->map[cpu], perf_counts(evsel->counts, cpu, 0)->val); err = -1; } } diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c index bd882f0..c9a37bc 100644 --- a/tools/perf/tests/openat-syscall.c +++ b/tools/perf/tests/openat-syscall.c @@ -44,9 +44,9 @@ int test__openat_syscall_event(void) goto out_close_fd; } - if (perf_counts(evsel->counts, 0)->val != nr_openat_calls) { + if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) { pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64 "\n", - nr_openat_calls, perf_counts(evsel->counts, 0)->val); + nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val); goto out_close_fd; } |