aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-perl.c
diff options
context:
space:
mode:
authorKan Liang <[email protected]>2015-07-02 07:08:43 +0000
committerArnaldo Carvalho de Melo <[email protected]>2015-08-28 14:49:52 +0000
commit601083cffb7cabdcc55b8195d732f0f7028570fa (patch)
tree6757499cf1e620c5a5cfec316fca124f0aa8ca52 /tools/perf/util/scripting-engines/trace-event-perl.c
parentMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadkernel-601083cffb7cabdcc55b8195d732f0f7028570fa.tar.gz
kernel-601083cffb7cabdcc55b8195d732f0f7028570fa.zip
perf stat: Get correct cpu id for print_aggr
print_aggr() fails to print per-core/per-socket statistics after commit 582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events") if events have differnt cpus. Because in print_aggr(), aggr_get_id needs index (not cpu id) to find core/pkg id. Also, evsel cpu maps should be used to get aggregated id. Here is an example: Counting events cycles,uncore_imc_0/cas_count_read/. (Uncore event has cpumask 0,18) $ perf stat -e cycles,uncore_imc_0/cas_count_read/ -C0,18 --per-core sleep 2 Without this patch, it failes to get CPU 18 result. Performance counter stats for 'CPU(s) 0,18': S0-C0 1 7526851 cycles S0-C0 1 1.05 MiB uncore_imc_0/cas_count_read/ S1-C0 0 <not counted> cycles S1-C0 0 <not counted> MiB uncore_imc_0/cas_count_read/ With this patch, it can get both CPU0 and CPU18 result. Performance counter stats for 'CPU(s) 0,18': S0-C0 1 6327768 cycles S0-C0 1 0.47 MiB uncore_imc_0/cas_count_read/ S1-C0 1 330228 cycles S1-C0 1 0.29 MiB uncore_imc_0/cas_count_read/ Signed-off-by: Kan Liang <[email protected]> Acked-by: Jiri Olsa <[email protected]> Acked-by: Stephane Eranian <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Fixes: 582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions