perf tools: Add cpu_map processor socket level functions
authorStephane Eranian <eranian@google.com>
Wed, 6 Feb 2013 14:46:01 +0000 (15:46 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2013 21:09:26 +0000 (18:09 -0300)
commit5ac59a8a77e3faa1eaf9bfe82a61e9396b082c3d
tree31bac73e17a1caf1dd34dbfb0a4fada571abb9e4
parent0479b8b9cf4377df5d2c81506ce93326c31eff40
perf tools: Add cpu_map processor socket level functions

This patch adds:
- cpu_map__get_socket: get socked id from cpu
- cpu_map__build_socket_map: build socket map
- cpu_map__socket: gets acutal socket from logical socket

Those functions are used by uncore and processor socket-level
aggregation modes.

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1360161962-9675-2-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cpumap.c
tools/perf/util/cpumap.h