perf cpumap: Rename empty functions
Remove cpu_map from name as a cpu_map isn't used. Pass a const pointer rather than by value to avoid unnecessary copying. Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Vineet Singh <vineet.singh@intel.com> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: zhengjun.xing@intel.com Link: https://lore.kernel.org/r/20220105061351.120843-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
3ac23d199c
commit
51b826fadf
@@ -698,7 +698,7 @@ static void print_counter_aggrdata(struct perf_stat_config *config,
|
||||
|
||||
uval = val * counter->scale;
|
||||
if (cpu != -1) {
|
||||
id = cpu_map__empty_aggr_cpu_id();
|
||||
id = aggr_cpu_id__empty();
|
||||
id.core = cpu;
|
||||
}
|
||||
printout(config, id, nr, counter, uval,
|
||||
@@ -780,7 +780,7 @@ static struct perf_aggr_thread_value *sort_aggr_thread(
|
||||
continue;
|
||||
|
||||
buf[i].counter = counter;
|
||||
buf[i].id = cpu_map__empty_aggr_cpu_id();
|
||||
buf[i].id = aggr_cpu_id__empty();
|
||||
buf[i].id.thread = thread;
|
||||
buf[i].uval = uval;
|
||||
buf[i].val = val;
|
||||
@@ -868,7 +868,7 @@ static void print_counter_aggr(struct perf_stat_config *config,
|
||||
fprintf(output, "%s", prefix);
|
||||
|
||||
uval = cd.avg * counter->scale;
|
||||
printout(config, cpu_map__empty_aggr_cpu_id(), 0, counter, uval, prefix, cd.avg_running,
|
||||
printout(config, aggr_cpu_id__empty(), 0, counter, uval, prefix, cd.avg_running,
|
||||
cd.avg_enabled, cd.avg, &rt_stat);
|
||||
if (!metric_only)
|
||||
fprintf(output, "\n");
|
||||
@@ -911,7 +911,7 @@ static void print_counter(struct perf_stat_config *config,
|
||||
fprintf(output, "%s", prefix);
|
||||
|
||||
uval = val * counter->scale;
|
||||
id = cpu_map__empty_aggr_cpu_id();
|
||||
id = aggr_cpu_id__empty();
|
||||
id.core = cpu;
|
||||
printout(config, id, 0, counter, uval, prefix,
|
||||
run, ena, 1.0, &rt_stat);
|
||||
@@ -938,7 +938,7 @@ static void print_no_aggr_metric(struct perf_stat_config *config,
|
||||
if (prefix)
|
||||
fputs(prefix, config->output);
|
||||
evlist__for_each_entry(evlist, counter) {
|
||||
id = cpu_map__empty_aggr_cpu_id();
|
||||
id = aggr_cpu_id__empty();
|
||||
id.core = cpu;
|
||||
if (first) {
|
||||
aggr_printout(config, counter, id, 0);
|
||||
|
||||
Reference in New Issue
Block a user