perf machine: Add method for common kernel_map(FUNCTION) operation
And it is also a step in the direction of killing the separation of data
and text maps in map_groups.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-rrds86kb3wx5wk8v38v56gw8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 281ab7f..cb98b5a 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -649,7 +649,7 @@
size_t size;
const char *mmap_name;
char name_buff[PATH_MAX];
- struct map *map = machine__kernel_map(machine, MAP__FUNCTION);
+ struct map *map = machine__kernel_map(machine);
struct kmap *kmap;
int err;
union perf_event *event;
@@ -1007,7 +1007,7 @@
* it now.
*/
if (cpumode == PERF_RECORD_MISC_KERNEL &&
- machine__kernel_map(machine, MAP__FUNCTION) == NULL)
+ machine__kernel_map(machine) == NULL)
machine__create_kernel_maps(machine);
thread__find_addr_map(thread, cpumode, MAP__FUNCTION, sample->ip, al);