aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cpumap.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-01-04 22:13:19 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-01-12 14:28:22 -0300
commit4e90e5cc74c6b1c1b9abff8b53cec5be1fb5e839 (patch)
treeca376199dd87c4fcf297ccbced5f6fb7351dd8cb /tools/perf/util/cpumap.c
parentperf cpumap: Document cpu__get_node() and remove redundant function (diff)
downloadlinux-dev-4e90e5cc74c6b1c1b9abff8b53cec5be1fb5e839.tar.xz
linux-dev-4e90e5cc74c6b1c1b9abff8b53cec5be1fb5e839.zip
perf cpumap: Remove map from function names that don't use a map
Move to the cpu name and document for consistency. 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-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cpumap.c')
-rw-r--r--tools/perf/util/cpumap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 1626b0991408..e0d7f1da5858 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -126,7 +126,7 @@ static int cpu__get_topology_int(int cpu, const char *name, int *value)
return sysfs__read_int(path, value);
}
-int cpu_map__get_socket_id(int cpu)
+int cpu__get_socket_id(int cpu)
{
int value, ret = cpu__get_topology_int(cpu, "physical_package_id", &value);
return ret ?: value;
@@ -136,7 +136,7 @@ struct aggr_cpu_id cpu_map__get_socket_aggr_by_cpu(int cpu, void *data __maybe_u
{
struct aggr_cpu_id id = aggr_cpu_id__empty();
- id.socket = cpu_map__get_socket_id(cpu);
+ id.socket = cpu__get_socket_id(cpu);
return id;
}
@@ -190,7 +190,7 @@ int cpu_map__build_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **res,
return 0;
}
-int cpu_map__get_die_id(int cpu)
+int cpu__get_die_id(int cpu)
{
int value, ret = cpu__get_topology_int(cpu, "die_id", &value);
@@ -202,7 +202,7 @@ struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data)
struct aggr_cpu_id id;
int die;
- die = cpu_map__get_die_id(cpu);
+ die = cpu__get_die_id(cpu);
/* There is no die_id on legacy system. */
if (die == -1)
die = 0;
@@ -220,7 +220,7 @@ struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data)
return id;
}
-int cpu_map__get_core_id(int cpu)
+int cpu__get_core_id(int cpu)
{
int value, ret = cpu__get_topology_int(cpu, "core_id", &value);
return ret ?: value;
@@ -229,7 +229,7 @@ int cpu_map__get_core_id(int cpu)
struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data)
{
struct aggr_cpu_id id;
- int core = cpu_map__get_core_id(cpu);
+ int core = cpu__get_core_id(cpu);
/* cpu_map__get_die returns a struct with socket and die set*/
id = cpu_map__get_die_aggr_by_cpu(cpu, data);