mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
dfca2d692d
commit
87ae87fd6c
@@ -389,12 +389,8 @@ process_counter_values(struct perf_stat_config *config, struct evsel *evsel,
|
||||
}
|
||||
|
||||
if (config->aggr_mode == AGGR_THREAD) {
|
||||
if (config->stats)
|
||||
perf_stat__update_shadow_stats(evsel,
|
||||
count->val, 0, &config->stats[thread]);
|
||||
else
|
||||
perf_stat__update_shadow_stats(evsel,
|
||||
count->val, 0, &rt_stat);
|
||||
perf_stat__update_shadow_stats(evsel, count->val,
|
||||
thread, &rt_stat);
|
||||
}
|
||||
break;
|
||||
case AGGR_GLOBAL:
|
||||
|
||||
Reference in New Issue
Block a user