From: Andi Kleen Date: Wed, 24 Sep 2014 20:50:46 +0000 (-0700) Subject: perf stat: Fix --per-core on multi socket systems X-Git-Tag: omap-for-v3.19/prcm-cleanup~97^2~3^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da88c7f78d842a6938d9adde6af87a2ce262051d;p=pandora-kernel.git 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 Acked-by: Stephane Eranian Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1411591846-32736-1-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed