perf tools: Add numa_topology object
authorJiri Olsa <jolsa@kernel.org>
Tue, 19 Feb 2019 09:58:14 +0000 (10:58 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Feb 2019 15:21:06 +0000 (12:21 -0300)
commit48e6c5acd36873ff022cd97de866bfd0a36a3b99
tree5c3dd2981a49b4b1b67a1813125a7cb1b35660a6
parent5135d5efcbb439c2acb20d6197dd57af3a456e76
perf tools: Add numa_topology object

Add the numa_topology object to return the list of numa nodes together
with their cpus. It will replace the numa code in header.c and will be
used from 'perf record' in the following patches.

Add the following interface functions to load numa details:

  struct numa_topology *numa_topology__new(void);
  void numa_topology__delete(struct numa_topology *tp);

And replace the current (copied) local interface, with no functional
changes.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190219095815.15931-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cputopo.c
tools/perf/util/cputopo.h
tools/perf/util/header.c