Commit 2696d6e5 authored by Jin Yao's avatar Jin Yao Committed by Arnaldo Carvalho de Melo

libperf: Add perf_cpu_map__default_new()

libperf already has a static function called 'cpu_map__default_new()'.

Add a new API perf_cpu_map__default_new() to export the function.
Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https //lore.kernel.org/r/20210723063433.7318-2-yao.jin@linux.intel.com
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ebdf90a4
......@@ -68,6 +68,11 @@ static struct perf_cpu_map *cpu_map__default_new(void)
return cpus;
}
struct perf_cpu_map *perf_cpu_map__default_new(void)
{
return cpu_map__default_new();
}
static int cmp_int(const void *a, const void *b)
{
return *(const int *)a - *(const int*)b;
......
......@@ -9,6 +9,7 @@
struct perf_cpu_map;
LIBPERF_API struct perf_cpu_map *perf_cpu_map__dummy_new(void);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__default_new(void);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__new(const char *cpu_list);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__read(FILE *file);
LIBPERF_API struct perf_cpu_map *perf_cpu_map__get(struct perf_cpu_map *map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment