* [PATCH] perf: Do not require /lib/modules/* on a guest
@ 2013-07-15 20:27 Jason Wessel
2013-07-29 22:40 ` David Ahern
2013-08-12 10:24 ` [tip:perf/core] perf machine: Do not require /lib/modules/ * " tip-bot for Jason Wessel
0 siblings, 2 replies; 3+ messages in thread
From: Jason Wessel @ 2013-07-15 20:27 UTC (permalink / raw)
To: a.p.zijlstra; +Cc: paulus, acme, linux-kernel
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>
---
tools/perf/util/machine.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index b2ecad6..eb9ebd6 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -808,7 +808,10 @@ static int machine__create_modules(struct machine *machine)
free(line);
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:
free(line);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: Do not require /lib/modules/* on a guest
2013-07-15 20:27 [PATCH] perf: Do not require /lib/modules/* on a guest Jason Wessel
@ 2013-07-29 22:40 ` David Ahern
2013-08-12 10:24 ` [tip:perf/core] perf machine: Do not require /lib/modules/ * " tip-bot for Jason Wessel
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2013-07-29 22:40 UTC (permalink / raw)
To: Jason Wessel, acme; +Cc: a.p.zijlstra, paulus, linux-kernel
On 7/15/13 2:27 PM, Jason Wessel wrote:
> 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.
Theoretically, use of modules is an option:
if (symbol_conf.use_modules && machine__create_modules(machine) < 0) {
...
}
But, the use_modules option was flipped from false to true by b32d133a
back in 2009. And the lack of complaints suggests this ominous warning
in perf-report, diff and annotate is moot:
OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules,
"load module symbols - WARNING: use only with -k and LIVE
kernel"),
>
> This patch changes the failure to locate kernel modules to be
> non-fatal.
>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
> tools/perf/util/machine.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index b2ecad6..eb9ebd6 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -808,7 +808,10 @@ static int machine__create_modules(struct machine *machine)
> free(line);
> 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:
> free(line);
Acked-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf machine: Do not require /lib/modules/ * on a guest
2013-07-15 20:27 [PATCH] perf: Do not require /lib/modules/* on a guest Jason Wessel
2013-07-29 22:40 ` David Ahern
@ 2013-08-12 10:24 ` tip-bot for Jason Wessel
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jason Wessel @ 2013-08-12 10:24 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, jason.wessel, peterz,
dsahern, tglx
Commit-ID: 8f76fcd902e3b3a7d6f6c695cc8bc053579eb179
Gitweb: http://git.kernel.org/tip/8f76fcd902e3b3a7d6f6c695cc8bc053579eb179
Author: Jason Wessel <jason.wessel@windriver.com>
AuthorDate: Mon, 15 Jul 2013 15:27:53 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 7 Aug 2013 17:35:41 -0300
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>
---
tools/perf/util/machine.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ef3b49c..6fcc358 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)
free(line);
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:
free(line);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-12 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 20:27 [PATCH] perf: Do not require /lib/modules/* on a guest Jason Wessel
2013-07-29 22:40 ` David Ahern
2013-08-12 10:24 ` [tip:perf/core] perf machine: Do not require /lib/modules/ * " tip-bot for Jason Wessel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).