* [PATCH] perf tools: demangle kernel and kernel module symbols too
@ 2014-01-22 19:58 Avi Kivity
2014-01-27 14:14 ` Avi Kivity
2014-02-02 8:54 ` [tip:perf/urgent] perf tools: Demangle " tip-bot for Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Avi Kivity @ 2014-01-22 19:58 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar, Avi Kivity
Some kernels contain C++ code, and thus their symbols need to be demangled.
This allows 'perf kvm top' to generate readable output.
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
---
tools/perf/util/symbol-elf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 7594567..8f12f0f 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
(u64)shdr.sh_offset);
sym.st_value -= shdr.sh_addr - shdr.sh_offset;
}
+new_symbol:
/*
* We need to figure out if the object was created from C++ sources
* DWARF DW_compile_unit has this, but we don't always have access
@@ -933,7 +934,6 @@ int dso__load_sym(struct dso *dso, struct map *map,
if (demangled != NULL)
elf_name = demangled;
}
-new_symbol:
f = symbol__new(sym.st_value, sym.st_size,
GELF_ST_BIND(sym.st_info), elf_name);
free(demangled);
--
1.8.4.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: demangle kernel and kernel module symbols too
2014-01-22 19:58 [PATCH] perf tools: demangle kernel and kernel module symbols too Avi Kivity
@ 2014-01-27 14:14 ` Avi Kivity
2014-01-27 14:48 ` Arnaldo Carvalho de Melo
2014-02-02 8:54 ` [tip:perf/urgent] perf tools: Demangle " tip-bot for Avi Kivity
1 sibling, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2014-01-27 14:14 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar, Avi Kivity
On 01/22/2014 09:58 PM, Avi Kivity wrote:
> Some kernels contain C++ code, and thus their symbols need to be demangled.
> This allows 'perf kvm top' to generate readable output.
Ping?
> Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
> ---
> tools/perf/util/symbol-elf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> index 7594567..8f12f0f 100644
> --- a/tools/perf/util/symbol-elf.c
> +++ b/tools/perf/util/symbol-elf.c
> @@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
> (u64)shdr.sh_offset);
> sym.st_value -= shdr.sh_addr - shdr.sh_offset;
> }
> +new_symbol:
> /*
> * We need to figure out if the object was created from C++ sources
> * DWARF DW_compile_unit has this, but we don't always have access
> @@ -933,7 +934,6 @@ int dso__load_sym(struct dso *dso, struct map *map,
> if (demangled != NULL)
> elf_name = demangled;
> }
> -new_symbol:
> f = symbol__new(sym.st_value, sym.st_size,
> GELF_ST_BIND(sym.st_info), elf_name);
> free(demangled);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf tools: demangle kernel and kernel module symbols too
2014-01-27 14:14 ` Avi Kivity
@ 2014-01-27 14:48 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-27 14:48 UTC (permalink / raw)
To: Avi Kivity; +Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar
Em Mon, Jan 27, 2014 at 04:14:24PM +0200, Avi Kivity escreveu:
> On 01/22/2014 09:58 PM, Avi Kivity wrote:
> >Some kernels contain C++ code, and thus their symbols need to be demangled.
> >This allows 'perf kvm top' to generate readable output.
>
> Ping?
Applied, should be on my next pull req to Ingo,
- Arnaldo
> >Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
> >---
> > tools/perf/util/symbol-elf.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> >index 7594567..8f12f0f 100644
> >--- a/tools/perf/util/symbol-elf.c
> >+++ b/tools/perf/util/symbol-elf.c
> >@@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
> > (u64)shdr.sh_offset);
> > sym.st_value -= shdr.sh_addr - shdr.sh_offset;
> > }
> >+new_symbol:
> > /*
> > * We need to figure out if the object was created from C++ sources
> > * DWARF DW_compile_unit has this, but we don't always have access
> >@@ -933,7 +934,6 @@ int dso__load_sym(struct dso *dso, struct map *map,
> > if (demangled != NULL)
> > elf_name = demangled;
> > }
> >-new_symbol:
> > f = symbol__new(sym.st_value, sym.st_size,
> > GELF_ST_BIND(sym.st_info), elf_name);
> > free(demangled);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/urgent] perf tools: Demangle kernel and kernel module symbols too
2014-01-22 19:58 [PATCH] perf tools: demangle kernel and kernel module symbols too Avi Kivity
2014-01-27 14:14 ` Avi Kivity
@ 2014-02-02 8:54 ` tip-bot for Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Avi Kivity @ 2014-02-02 8:54 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, avi, tglx
Commit-ID: 950b8354716eb1f9c0b39777d379efa5f4125c04
Gitweb: http://git.kernel.org/tip/950b8354716eb1f9c0b39777d379efa5f4125c04
Author: Avi Kivity <avi@cloudius-systems.com>
AuthorDate: Wed, 22 Jan 2014 21:58:46 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 27 Jan 2014 11:47:27 -0300
perf tools: Demangle kernel and kernel module symbols too
Some kernels contain C++ code, and thus their symbols need to be
demangled. This allows 'perf kvm top' to generate readable output.
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/26f71bf5bf7ee1408e3f1a803556d5df18223ef1.1390420726.git.avi@cloudius-systems.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol-elf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 7594567..8f12f0f 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -922,6 +922,7 @@ int dso__load_sym(struct dso *dso, struct map *map,
(u64)shdr.sh_offset);
sym.st_value -= shdr.sh_addr - shdr.sh_offset;
}
+new_symbol:
/*
* We need to figure out if the object was created from C++ sources
* DWARF DW_compile_unit has this, but we don't always have access
@@ -933,7 +934,6 @@ int dso__load_sym(struct dso *dso, struct map *map,
if (demangled != NULL)
elf_name = demangled;
}
-new_symbol:
f = symbol__new(sym.st_value, sym.st_size,
GELF_ST_BIND(sym.st_info), elf_name);
free(demangled);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-02 8:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22 19:58 [PATCH] perf tools: demangle kernel and kernel module symbols too Avi Kivity
2014-01-27 14:14 ` Avi Kivity
2014-01-27 14:48 ` Arnaldo Carvalho de Melo
2014-02-02 8:54 ` [tip:perf/urgent] perf tools: Demangle " tip-bot for Avi Kivity
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).