lkml.org 
[lkml]   [2013]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] perf: Do not require /lib/modules/* on a guest
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>



\
 
 \ /
  Last update: 2013-07-30 01:01    [W:0.091 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site