perf cpu_map: Make cpu_map__build_map global
authorJiri Olsa <jolsa@kernel.org>
Fri, 16 Oct 2015 10:41:14 +0000 (12:41 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 19 Oct 2015 21:03:03 +0000 (18:03 -0300)
We'll need to call it from perf stat in the stat_script patchkit

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Kan Liang <kan.liang@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1444992092-17897-40-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cpumap.c
tools/perf/util/cpumap.h

index c51c29fd0732a607927140eebc2cd474b97e339a..70ec8d031f9d69d401e1487c63181d22d1439f50 100644 (file)
@@ -258,8 +258,8 @@ static int cmp_ids(const void *a, const void *b)
        return *(int *)a - *(int *)b;
 }
 
-static int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res,
-                             int (*f)(struct cpu_map *map, int cpu))
+int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res,
+                      int (*f)(struct cpu_map *map, int cpu))
 {
        struct cpu_map *c;
        int nr = cpus->nr;
index 8982d538da83dbddf736e69f6743c282cb9021ff..6e36fc35eca6f08f66bbb91b63e31b50687b3399 100644 (file)
@@ -87,4 +87,6 @@ static inline int cpu__get_node(int cpu)
        return cpunode_map[cpu];
 }
 
+int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res,
+                      int (*f)(struct cpu_map *map, int cpu));
 #endif /* __PERF_CPUMAP_H */