From 193b6bd339ccb30c861a307a915d4532f443e0fb Mon Sep 17 00:00:00 2001 From: Kan Liang Date: Tue, 1 Sep 2015 09:58:11 -0400 Subject: perf cpumap: Factor out functions to get core_id and socket_id This patch moves the code which reads core_id and socket_id into separate functions. Signed-off-by: Kan Liang Cc: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1441115893-22006-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cpumap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util/cpumap.h') diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 0af9cecb4c51..8982d538da83 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -18,7 +18,9 @@ struct cpu_map *cpu_map__new(const char *cpu_list); struct cpu_map *cpu_map__dummy_new(void); struct cpu_map *cpu_map__read(FILE *file); size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp); +int cpu_map__get_socket_id(int cpu); int cpu_map__get_socket(struct cpu_map *map, int idx); +int cpu_map__get_core_id(int cpu); int cpu_map__get_core(struct cpu_map *map, int idx); int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp); int cpu_map__build_core_map(struct cpu_map *cpus, struct cpu_map **corep); -- cgit v1.2.3