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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user