summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-01-04 22:13:22 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-01-12 14:28:22 -0300
commit973aeb3c7ada35b75442126c745bb6074cb3e172 (patch)
treec56d9d7aa43610174f51d9831eff55ee7a42ca28 /tools/perf/builtin-stat.c
parent5f50e15c1510c77b37e10c6b22912bf4bf11476b (diff)
perf cpumap: Rename cpu_map__get_X_aggr_by_cpu functions
The functions don't use a cpu_map so reduce them to being like constructors of aggr_cpu_id. 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-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index c55a7fee22bc..a518fcf0b3f8 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1336,25 +1336,25 @@ static const char *const aggr_mode__string[] = {
static struct aggr_cpu_id perf_stat__get_socket(struct perf_stat_config *config __maybe_unused,
int cpu)
{
- return cpu_map__get_socket_aggr_by_cpu(cpu, /*data=*/NULL);
+ return aggr_cpu_id__socket(cpu, /*data=*/NULL);
}
static struct aggr_cpu_id perf_stat__get_die(struct perf_stat_config *config __maybe_unused,
int cpu)
{
- return cpu_map__get_die_aggr_by_cpu(cpu, /*data=*/NULL);
+ return aggr_cpu_id__die(cpu, /*data=*/NULL);
}
static struct aggr_cpu_id perf_stat__get_core(struct perf_stat_config *config __maybe_unused,
int cpu)
{
- return cpu_map__get_core_aggr_by_cpu(cpu, /*data=*/NULL);
+ return aggr_cpu_id__core(cpu, /*data=*/NULL);
}
static struct aggr_cpu_id perf_stat__get_node(struct perf_stat_config *config __maybe_unused,
int cpu)
{
- return cpu_map__get_node_aggr_by_cpu(cpu, /*data=*/NULL);
+ return aggr_cpu_id__node(cpu, /*data=*/NULL);
}
static struct aggr_cpu_id perf_stat__get_aggr(struct perf_stat_config *config,
@@ -1409,16 +1409,16 @@ static aggr_cpu_id_get_t aggr_mode__get_aggr(enum aggr_mode aggr_mode)
{
switch (aggr_mode) {
case AGGR_SOCKET:
- return cpu_map__get_socket_aggr_by_cpu;
+ return aggr_cpu_id__socket;
case AGGR_DIE:
- return cpu_map__get_die_aggr_by_cpu;
+ return aggr_cpu_id__die;
case AGGR_CORE:
- return cpu_map__get_core_aggr_by_cpu;
+ return aggr_cpu_id__core;
case AGGR_NODE:
- return cpu_map__get_node_aggr_by_cpu;
+ return aggr_cpu_id__node;
case AGGR_NONE:
if (term_percore_set())
- return cpu_map__get_core_aggr_by_cpu;
+ return aggr_cpu_id__core;
return NULL;
case AGGR_GLOBAL: