[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100603175445.GC8928@ghostprotocols.net>
Date: Thu, 3 Jun 2010 14:54:45 -0300
From: Arnaldo Carvalho de Melo <acme@...radead.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
paulus@...ba.org, davem@...emloft.net, fweisbec@...il.com,
perfmon2-devel@...ts.sf.net, eranian@...il.com, tzanussi@...il.com
Subject: Re: how to use perf annotate on the kernel
Em Thu, Jun 03, 2010 at 07:23:02PM +0200, Stephane Eranian escreveu:
> Arnaldo,
>
> I am trying to understand how one is supposed
> to use perf annotate to get sample correlations
> with kernel symbols.
>
> I do:
>
> # perf record -a -e cycles:k dd if=/dev/zero of=/dev/null count=1000000
> # perf report
>
> # Events: 14K cycles
> #
> # Overhead Command Shared Object Symbol
> # ........ ............... ................... ......
> #
> 8.76% dd [kernel.kallsyms] [k] __lock_acquire
> 7.49% dd [kernel.kallsyms] [k] sched_clock
>
> # perf annotate (or annotate -d '[kernel.kallsyms]'?)
> Can't annotate __lock_acquire: No vmlinux file was found in the path
>
> # perf annotate -k vmlinux
> objdump: '[kernel.kallsyms]': No such file
This looks like a bug in how it reports this problem, probably vmlinux
is not in the current directory, or it is but has a build-id that
doesn't matches the one in the perf.data file.
But the message is wrong, should be like it is in the tui, for this same
situation:
ui_helpline__puts("No vmlinux file found, can't "
"annotate with just a kallsyms file");
> Am I missing something here?
If you don't specify it with --vmlinux/-k it will try to find it in one
of these places:
vmlinux_path[vmlinux_path__nr_entries] = strdup("vmlinux");
if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail;
++vmlinux_path__nr_entries;
vmlinux_path[vmlinux_path__nr_entries] = strdup("/boot/vmlinux");
if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail;
++vmlinux_path__nr_entries;
snprintf(bf, sizeof(bf), "/boot/vmlinux-%s", uts.release);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail;
++vmlinux_path__nr_entries;
snprintf(bf, sizeof(bf), "/lib/modules/%s/build/vmlinux", uts.release);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
if (vmlinux_path[vmlinux_path__nr_entries] == NULL)
goto out_fail;
++vmlinux_path__nr_entries;
snprintf(bf, sizeof(bf), "/usr/lib/debug/lib/modules/%s/vmlinux",
uts.release);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
It also now looks at /sys/kernel/notes, gets the build-id, and looks up
in the build-id cache.
- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists