aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-07-15 16:27:53 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-08-07 16:35:41 -0400
commit8f76fcd902e3b3a7d6f6c695cc8bc053579eb179 (patch)
treef3d552c27ff49bb5d28ec58fdf0e3564eeb6d0b8
parentc9ee780f2736b7a149658b0cd8c8389da23e190a (diff)
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>
-rw-r--r--tools/perf/util/machine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ef3b49cde04e..6fcc358138ae 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -806,7 +806,10 @@ static int machine__create_modules(struct machine *machine)
806 free(line); 806 free(line);
807 fclose(file); 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
811out_delete_line: 814out_delete_line:
812 free(line); 815 free(line);