perf machine: Add method for common kernel_map(FUNCTION) operation
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-kmem.c
index 23b1faaaa4cc5f83c263ffbc9a0f14733c0dcae2..93ce665f976f65a4a1889ba01441bb1f1cce2786 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);
        if (map__load(kernel_map, NULL) < 0) {
                pr_err("cannot load kernel map\n");
                return -ENOENT;