aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/stat-shadow.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2022-09-30 13:21:07 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-06 08:03:53 -0300
commit87ae87fd6c61c93a93b79c6c6c8ec5f47e4839dd (patch)
tree134f680ea665ca79af369085de515e0ec4703679 /tools/perf/util/stat-shadow.c
parentperf stat: Rename saved_value->cpu_map_idx (diff)
downloadlinux-dev-87ae87fd6c61c93a93b79c6c6c8ec5f47e4839dd.tar.xz
linux-dev-87ae87fd6c61c93a93b79c6c6c8ec5f47e4839dd.zip
perf stat: Use thread map index for shadow stat
When AGGR_THREAD is active, it aggregates the values for each thread. Previously it used cpu map index which is invalid for AGGR_THREAD so it had to use separate runtime stats with index 0. But it can just use the rt_stat with thread_map_index. Rename the first_shadow_map_idx() and make it return the thread index. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20220930202110.845199-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat-shadow.c')
-rw-r--r--tools/perf/util/stat-shadow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index 48634b95669e..60c8709fb53c 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -33,7 +33,7 @@ struct saved_value {
struct evsel *evsel;
enum stat_type type;
int ctx;
- int map_idx; /* cpu map index */
+ int map_idx; /* cpu or thread map index */
struct cgroup *cgrp;
struct runtime_stat *stat;
struct stats stats;