diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 17:49:48 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-04 00:23:55 -0200 |
commit | 60d567e2d9187379d642f6aba7c8a52b3fd5d261 (patch) | |
tree | 7d6bd6f6805ff68f4fab3c0e08b7139cc5206b7d /tools/perf/util/cpumap.h | |
parent | 48290609c0d265f5dac0fca6fd4e3c5732542f67 (diff) | |
download | linux-stable-60d567e2d9187379d642f6aba7c8a52b3fd5d261.tar.gz linux-stable-60d567e2d9187379d642f6aba7c8a52b3fd5d261.tar.bz2 linux-stable-60d567e2d9187379d642f6aba7c8a52b3fd5d261.zip |
perf tools: Refactor cpumap to hold nr and the map
So that later, we can pass the cpu_map instance instead of (nr_cpus, cpu_map)
for things like perf_evsel__open and friends.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
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.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h index 3e60f56e490e..f7a4f42f6307 100644 --- a/tools/perf/util/cpumap.h +++ b/tools/perf/util/cpumap.h @@ -1,7 +1,13 @@ #ifndef __PERF_CPUMAP_H #define __PERF_CPUMAP_H -extern int read_cpu_map(const char *cpu_list); -extern int cpumap[]; +struct cpu_map { + int nr; + int map[]; +}; + +struct cpu_map *cpu_map__new(const char *cpu_list); +struct cpu_map *cpu_map__dummy_new(void); +void *cpu_map__delete(struct cpu_map *map); #endif /* __PERF_CPUMAP_H */ |