perf machine: Use machine__kernel_map() thoroughly
[cascardo/linux.git] / tools / perf / builtin-kmem.c
index 23b1faa..b122c4e 100644 (file)
@@ -329,7 +329,7 @@ static int build_alloc_func_list(void)
                return -EINVAL;
        }
 
-       kernel_map = machine->vmlinux_maps[MAP__FUNCTION];
+       kernel_map = machine__kernel_map(machine, MAP__FUNCTION)
        if (map__load(kernel_map, NULL) < 0) {
                pr_err("cannot load kernel map\n");
                return -ENOENT;