aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorAthira Rajeev <[email protected]>2022-10-06 17:12:25 +0530
committerArnaldo Carvalho de Melo <[email protected]>2022-10-06 14:50:55 -0300
commitcad3b68954134f6b871e76d9b39354e8d9a53db5 (patch)
treef4e6b3ae9095daaa39bafa0c36cc2c715ea5b50c /tools/perf/scripts/python/libxed.py
parentdc2e0fb00bb2b24f0b6c4877c34bb1d288d31fb2 (diff)
perf stat: Fix cpu check to use id.cpu.cpu in aggr_printout()
'perf stat' has options to aggregate the counts in different modes like per socket, per core etc. The function "aggr_printout" in util/stat-display.c which is used to print the aggregates, has a check for cpu in case of AGGR_NONE. This check was originally using condition : "if (id.cpu.cpu > -1)". But this got changed after commit df936cadfb58 ("perf stat: Add JSON output option"), which added option to output json format for different aggregation modes. After this commit, the check in "aggr_printout" is using "if (id.core > -1)". The old code was using "id.cpu.cpu > -1" while the new code is using "id.core > -1". But since the value printed is id.cpu.cpu, fix this check to use cpu and not core. Suggested-by: Ian Rogers <[email protected]> Suggested-by: James Clark <[email protected]> Signed-off-by: Athira Jajeev <[email protected]> Tested-by: Ian Rogers <[email protected]> Cc: Disha Goel <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nageswara R Sastry <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions