* [PATCH] perf tools: Adjust symbols in VDSO
@ 2014-04-11 14:25 Vladimir Nikulichev
2014-04-17 8:46 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Nikulichev @ 2014-04-11 14:25 UTC (permalink / raw)
To: Jiri Olsa
Cc: Namhyung Kim, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
perf tools: Adjust symbols in VDSO
pert-report doesn't resolve function names in VDSO:
$ perf report --stdio -g flat,0.0,15,callee --sort pid
...
8.76%
0x7fff6b1fe861
__gettimeofday
ACE_OS::gettimeofday()
...
In this case symbol values should be adjusted the same way as for
executables,
relocatable objects and prelinked libraries.
After fix:
$ perf report --stdio -g flat,0.0,15,callee --sort pid
...
8.76%
__vdso_gettimeofday
__gettimeofday
ACE_OS::gettimeofday()
Signed-off-by: Vladimir Nikulichev <nvs@tbricks.com>
diff --git a/tools/perf/util/symbol-elf.c
b/tools/perf/util/symbol-elf.c
index 3b7dbf5..6864661 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -6,6 +6,7 @@
#include <inttypes.h>
#include "symbol.h"
+#include "vdso.h"
#include <symbol/kallsyms.h>
#include "debug.h"
@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso
*dso, const char *name,
GElf_Shdr shdr;
ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
ehdr.e_type == ET_REL ||
+ is_vdso_map(dso->short_name) ||
elf_section_by_name(elf, &ehdr, &shdr,
".gnu.prelink_undo",
NULL) != NULL);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf tools: Adjust symbols in VDSO
2014-04-11 14:25 [PATCH] perf tools: Adjust symbols in VDSO Vladimir Nikulichev
@ 2014-04-17 8:46 ` Adrian Hunter
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2014-04-17 8:46 UTC (permalink / raw)
To: Vladimir Nikulichev, Jiri Olsa
Cc: Namhyung Kim, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
On 04/11/2014 05:25 PM, Vladimir Nikulichev wrote:
> perf tools: Adjust symbols in VDSO
>
> pert-report doesn't resolve function names in VDSO:
>
> $ perf report --stdio -g flat,0.0,15,callee --sort pid
> ...
> 8.76%
> 0x7fff6b1fe861
> __gettimeofday
> ACE_OS::gettimeofday()
> ...
>
> In this case symbol values should be adjusted the same way as for executables,
> relocatable objects and prelinked libraries.
>
> After fix:
>
> $ perf report --stdio -g flat,0.0,15,callee --sort pid
> ...
> 8.76%
> __vdso_gettimeofday
> __gettimeofday
> ACE_OS::gettimeofday()
>
> Signed-off-by: Vladimir Nikulichev <nvs@tbricks.com>
Annotation still doesn't work. but this is a start, so:
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
>
> diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> index 3b7dbf5..6864661 100644
> --- a/tools/perf/util/symbol-elf.c
> +++ b/tools/perf/util/symbol-elf.c
> @@ -6,6 +6,7 @@
> #include <inttypes.h>
>
> #include "symbol.h"
> +#include "vdso.h"
> #include <symbol/kallsyms.h>
> #include "debug.h"
>
> @@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso,
> const char *name,
> GElf_Shdr shdr;
> ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
> ehdr.e_type == ET_REL ||
> + is_vdso_map(dso->short_name) ||
> elf_section_by_name(elf, &ehdr, &shdr,
> ".gnu.prelink_undo",
> NULL) != NULL);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] perf tools: Adjust symbols in VDSO
@ 2014-04-11 13:19 Vladimir Nikulichev
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Nikulichev @ 2014-04-11 13:19 UTC (permalink / raw)
To: Jiri Olsa
Cc: Namhyung Kim, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
perf tools: Adjust symbols in VDSO
pert-report doesn't resolve function names in VDSO:
$ perf report --stdio -g flat,0.0,15,callee --sort pid
..
8.76%
0x7fff6b1fe861
__gettimeofday
ACE_OS::gettimeofday()
..
In this case symbol values should be adjusted the same way as for executables, relocatable objects and prelinked libraries.
After fix:
$ perf report --stdio -g flat,0.0,15,callee --sort pid
..
8.76%
__vdso_gettimeofday
__gettimeofday
ACE_OS::gettimeofday()
Signed-off-by: Vladimir Nikulichev <nvs@tbricks.com>
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 3b7dbf5..6864661 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -6,6 +6,7 @@
#include <inttypes.h>
#include "symbol.h"
+#include "vdso.h"
#include <symbol/kallsyms.h>
#include "debug.h"
@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
GElf_Shdr shdr;
ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
ehdr.e_type == ET_REL ||
+ is_vdso_map(dso->short_name) ||
elf_section_by_name(elf, &ehdr, &shdr,
".gnu.prelink_undo",
NULL) != NULL);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-17 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11 14:25 [PATCH] perf tools: Adjust symbols in VDSO Vladimir Nikulichev
2014-04-17 8:46 ` Adrian Hunter
-- strict thread matches above, loose matches on Subject: below --
2014-04-11 13:19 Vladimir Nikulichev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.