perf cpumap: Document cpu__get_node() and remove redundant function

cpu_map__get_node_id() isn't used externally and merely delegates to
cpu__get_node().

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-16-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Ian Rogers 2022-01-04 22:13:18 -08:00 коммит произвёл Arnaldo Carvalho de Melo
Родитель 51b826fadf
Коммит 194a3a2025
2 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -16,6 +16,10 @@
static int max_cpu_num;
static int max_present_cpu_num;
static int max_node_num;
/**
* The numa node X as read from /sys/devices/system/node/nodeX indexed by the
* CPU number.
*/
static int *cpunode_map;
static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus)
@ -222,11 +226,6 @@ int cpu_map__get_core_id(int cpu)
return ret ?: value;
}
int cpu_map__get_node_id(int cpu)
{
return cpu__get_node(cpu);
}
struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data)
{
struct aggr_cpu_id id;
@ -250,7 +249,7 @@ struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data __maybe_unu
{
struct aggr_cpu_id id = aggr_cpu_id__empty();
id.node = cpu_map__get_node_id(cpu);
id.node = cpu__get_node(cpu);
return id;
}

Просмотреть файл

@ -45,7 +45,6 @@ int cpu_map__get_die_id(int cpu);
struct aggr_cpu_id cpu_map__get_die_aggr_by_cpu(int cpu, void *data);
int cpu_map__get_core_id(int cpu);
struct aggr_cpu_id cpu_map__get_core_aggr_by_cpu(int cpu, void *data);
int cpu_map__get_node_id(int cpu);
struct aggr_cpu_id cpu_map__get_node_aggr_by_cpu(int cpu, void *data);
int cpu_map__build_socket_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **sockp);
int cpu_map__build_die_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **diep);
@ -58,6 +57,10 @@ int cpu__setup_cpunode_map(void);
int cpu__max_node(void);
int cpu__max_cpu(void);
int cpu__max_present_cpu(void);
/**
* cpu__get_node - Returns the numa node X as read from
* /sys/devices/system/node/nodeX for the given CPU.
*/
int cpu__get_node(int cpu);
int cpu_map__build_map(struct perf_cpu_map *cpus, struct cpu_aggr_map **res,