summaryrefslogtreecommitdiff
path: root/tools/perf/util/machine.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-24 17:06:25 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:10 -0300
commit68a741868a0612408a46fda4c06663315d40c544 (patch)
tree186c1fafea08b167628947a572fd967b0884017a /tools/perf/util/machine.h
parentffef80ecf89f0a883e976534a62db04059d3a4f6 (diff)
perf machine: Introduce machine__kernel_maps()
That returns the a data structure contained the ordered list of kernel modules + the main kernel maps, one more step in removing the MAP__{FUNCTION,VARIABLE} split. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-qsgbxfyaohc80c9ma049dubm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r--tools/perf/util/machine.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 66cc200ef86f..92303ac718a6 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -70,12 +70,24 @@ struct map *__machine__kernel_map(struct machine *machine, enum map_type type)
return machine->vmlinux_maps[type];
}
+/*
+ * The main kernel (vmlinux) map
+ */
static inline
struct map *machine__kernel_map(struct machine *machine)
{
return __machine__kernel_map(machine, MAP__FUNCTION);
}
+/*
+ * kernel (the one returned by machine__kernel_map()) plus kernel modules maps
+ */
+static inline
+struct maps *machine__kernel_maps(struct machine *machine)
+{
+ return &machine->kmaps.maps[MAP__FUNCTION];
+}
+
int machine__get_kernel_start(struct machine *machine);
static inline u64 machine__kernel_start(struct machine *machine)