summaryrefslogtreecommitdiff
path: root/tools/perf/util/cpumap.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@intel.com>2015-09-01 16:58:11 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-02 22:30:47 +0300
commit193b6bd339ccb30c861a307a915d4532f443e0fb (patch)
tree4eb3ed51a61f229f8c09ceaf150df99b0fdf7d37 /tools/perf/util/cpumap.h
parent76055940c1afc8d445992fb0278b80cf205bbf97 (diff)
downloadlinux-193b6bd339ccb30c861a307a915d4532f443e0fb.tar.xz
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 <kan.liang@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/1441115893-22006-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cpumap.h')
-rw-r--r--tools/perf/util/cpumap.h2
1 files changed, 2 insertions, 0 deletions
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);