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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
134aa44f6b
commit
1ac77e1ce8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user