diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2022-09-30 13:21:10 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-10-06 08:03:53 -0300 |
| commit | fa2edc07b4643f9dc1db80b2c51ef81f62b26614 (patch) | |
| tree | ce16f5c14f29f211abff24b87ed804356c643bc7 /tools/perf/util/stat-display.c | |
| parent | perf stat: Don't compare runtime stat for shadow stats (diff) | |
| download | linux-fa2edc07b4643f9dc1db80b2c51ef81f62b26614.tar.gz linux-fa2edc07b4643f9dc1db80b2c51ef81f62b26614.zip | |
perf stat: Rename to aggr_cpu_id.thread_idx
The aggr_cpu_id has a thread value but it's actually an index to the
thread_map. To reduce possible confusion, rename it to thread_idx.
Suggested-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
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-8-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat-display.c')
| -rw-r--r-- | tools/perf/util/stat-display.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 570e2c04d47d..df26fb5eb072 100644 --- a/tools/perf/util/stat-display.c +++ b/tools/perf/util/stat-display.c @@ -189,14 +189,14 @@ static void aggr_printout(struct perf_stat_config *config, case AGGR_THREAD: if (config->json_output) { fprintf(config->output, "\"thread\" : \"%s-%d\", ", - perf_thread_map__comm(evsel->core.threads, id.thread), - perf_thread_map__pid(evsel->core.threads, id.thread)); + perf_thread_map__comm(evsel->core.threads, id.thread_idx), + perf_thread_map__pid(evsel->core.threads, id.thread_idx)); } else { fprintf(config->output, "%*s-%*d%s", config->csv_output ? 0 : 16, - perf_thread_map__comm(evsel->core.threads, id.thread), + perf_thread_map__comm(evsel->core.threads, id.thread_idx), config->csv_output ? 0 : -8, - perf_thread_map__pid(evsel->core.threads, id.thread), + perf_thread_map__pid(evsel->core.threads, id.thread_idx), config->csv_sep); } break; @@ -453,7 +453,7 @@ static int first_shadow_map_idx(struct perf_stat_config *config, return perf_cpu_map__idx(cpus, id->cpu); if (config->aggr_mode == AGGR_THREAD) - return id->thread; + return id->thread_idx; if (!config->aggr_get_id) return 0; @@ -946,7 +946,7 @@ static struct perf_aggr_thread_value *sort_aggr_thread( buf[i].counter = counter; buf[i].id = aggr_cpu_id__empty(); - buf[i].id.thread = thread; + buf[i].id.thread_idx = thread; buf[i].uval = uval; buf[i].val = val; buf[i].run = run; |
