diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-08-22 14:11:39 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-08-22 17:17:03 +0300 |
commit | 315c0a1f0ccdd44c65f80ccbc62202fed8a23050 (patch) | |
tree | 7a4ba0191b49d5ec462d2d7c8a9fb472475c47ee /tools/perf/util/cpumap.c | |
parent | 6549cd8f2cc2cdf7e107fbbc3a68ecefb774bb2f (diff) | |
download | linux-315c0a1f0ccdd44c65f80ccbc62202fed8a23050.tar.xz |
libperf: Move perf's cpu_map__empty() to perf_cpu_map__empty()
So it's part of the libperf library as one of basic functions operating
on the perf_cpu_map class.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190822111141.25823-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cpumap.c')
-rw-r--r-- | tools/perf/util/cpumap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index beb3525e9e45..4402e67445a4 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -21,7 +21,7 @@ static struct perf_cpu_map *cpu_map__from_entries(struct cpu_map_entries *cpus) { struct perf_cpu_map *map; - map = cpu_map__empty_new(cpus->nr); + map = perf_cpu_map__empty_new(cpus->nr); if (map) { unsigned i; @@ -48,7 +48,7 @@ static struct perf_cpu_map *cpu_map__from_mask(struct cpu_map_mask *mask) nr = bitmap_weight(mask->mask, nbits); - map = cpu_map__empty_new(nr); + map = perf_cpu_map__empty_new(nr); if (map) { int cpu, i = 0; @@ -77,7 +77,7 @@ size_t cpu_map__fprintf(struct perf_cpu_map *map, FILE *fp) #undef BUFSIZE } -struct perf_cpu_map *cpu_map__empty_new(int nr) +struct perf_cpu_map *perf_cpu_map__empty_new(int nr) { struct perf_cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int) * nr); |