]> git.baikalelectronics.ru Git - kernel.git/commit
perf stat: Fix --per-core on multi socket systems
authorAndi Kleen <ak@linux.intel.com>
Wed, 24 Sep 2014 20:50:46 +0000 (13:50 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Sep 2014 13:17:13 +0000 (10:17 -0300)
commite8331063bfc8f8b0dd00529e825217ee37cf5eeb
tree9a5cb01c15a56d7ca6a309ae5f570cbf593fb6e7
parentb5ef7a8b1fadd4c694fc7898f0c5ae70f152eafb
perf stat: Fix --per-core on multi socket systems

On systems with more than one socket perf stat --per-core would either
segfault or stop before outputting all cores.

The problem was that the output code referenced the id including the
socket number in the higher bits, which is far beyond any per cpu array.

Mask out the socket number before referencing cpus in abs_printout.

I also renamed the variable in nsec_printout to be clear what it is,
even though it doesn't reference cpus.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Stephane Eranian <eranian@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1411591846-32736-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c