Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jason Wessel <jason.wessel@windriver.com>
Acked-by: David 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jason Wessel and committed by
Arnaldo Carvalho de Melo
8f76fcd9 c9ee780f

+4 -1
+4 -1
tools/perf/util/machine.c
··· 806 806 free(line); 807 807 fclose(file); 808 808 809 - return machine__set_modules_path(machine); 809 + if (machine__set_modules_path(machine) < 0) { 810 + pr_debug("Problems setting modules path maps, continuing anyway...\n"); 811 + } 812 + return 0; 810 813 811 814 out_delete_line: 812 815 free(line);