perf cpu_map: Add cpu_map event synthesize function

Introduce the perf_event__synthesize_cpu_map function to synthesize a
struct cpu_map.

Added generic interface:
  cpu_map_data__alloc
  cpu_map_data__synthesize

to make the cpu_map synthesizing usable for other events.

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/1445784728-21732-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2015-10-25 15:51:24 +01:00
committed by Arnaldo Carvalho de Melo
parent 6640b6c227
commit 6c872901af
6 changed files with 216 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ static struct test generic_tests[] = {
.desc = "Test thread map synthesize",
.func = test__thread_map_synthesize,
},
{
.desc = "Test cpu map synthesize",
.func = test__cpu_map_synthesize,
},
{
.func = NULL,
},