Commit 8f76fcd9 authored by Jason Wessel's avatar Jason Wessel Committed by Arnaldo Carvalho de Melo

perf machine: Do not require /lib/modules/* on a guest

For some types of work loads and special guest environments, you might
have a kernel that has no kernel modules.  The perf kvm record tool
fails instantiate vmlinux maps when the kernel modules directory cannot
be opened, even though the kallsyms has been properly processed.  This
leads to a perf kvm report that has no guest symbols resolved.

This patch changes the failure to locate kernel modules to be non-fatal.
Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1373920073-4874-1-git-send-email-jason.wessel@windriver.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c9ee780f
...@@ -806,7 +806,10 @@ static int machine__create_modules(struct machine *machine) ...@@ -806,7 +806,10 @@ static int machine__create_modules(struct machine *machine)
free(line); free(line);
fclose(file); fclose(file);
return machine__set_modules_path(machine); if (machine__set_modules_path(machine) < 0) {
pr_debug("Problems setting modules path maps, continuing anyway...\n");
}
return 0;
out_delete_line: out_delete_line:
free(line); free(line);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment