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: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jiri 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: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jin Yao 2021-07-23 14:34:31 +08:00 committed by Arnaldo Carvalho de Melo
parent ebdf90a4a1
commit 2696d6e59c
2 changed files with 6 additions and 0 deletions

View file

@ -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;