* Re: [PATCH] Correctly handle symbols in VDSO [not found] ` <3C60FB26-A78B-4E37-B4A6-E6F7283CEB4C@tbricks.com> @ 2014-04-08 15:41 ` Jiri Olsa [not found] ` <A7CC2084-4F71-436C-9AEC-394F66A4981E@tbricks.com> 0 siblings, 1 reply; 3+ messages in thread From: Jiri Olsa @ 2014-04-08 15:41 UTC (permalink / raw) To: Vladimir Nikulichev Cc: Namhyung Kim, linux-perf-users, Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel On Tue, Apr 08, 2014 at 07:24:22PM +0400, Vladimir Nikulichev wrote: > Hi Namhyung, > > On Apr 7, 2014, at 10:14 AM, Namhyung Kim <namhyung@kernel.org> wrote: > > > Just one question below.. > > > >> > >> --------------------------------------------------------------------------------------------------------------------------- > >> > >> perf tools: Adjust symbols in VDSO > >> > >> 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..9c8b23b 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,8 @@ 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 || > >> + (dso->symsrc_filename == NULL && > > > > Is this really needed? Just checking is_vdso_map() seems to work well > > for me. Did you have a specific reason to add it? > > > > Nothing specific, just to don't call string operations in most cases. But here it is only a matter of coding style, of course. > Attaching shorter version of the patch. > > ---------------------------- > > perf tools: Adjust symbols in VDSO hi, could you please put explanation from first email into the patch changelog? cc-ing lkml thanks, jirka ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <A7CC2084-4F71-436C-9AEC-394F66A4981E@tbricks.com>]
* Re: [PATCH] Correctly handle symbols in VDSO [not found] ` <A7CC2084-4F71-436C-9AEC-394F66A4981E@tbricks.com> @ 2014-04-09 15:35 ` Jiri Olsa 2014-04-09 16:13 ` Jiri Olsa 0 siblings, 1 reply; 3+ messages in thread From: Jiri Olsa @ 2014-04-09 15:35 UTC (permalink / raw) To: Vladimir Nikulichev Cc: Namhyung Kim, linux-perf-users, Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel On Wed, Apr 09, 2014 at 10:46:13AM +0400, Vladimir Nikulichev wrote: > Hi, > > On Apr 8, 2014, at 7:41 PM, Jiri Olsa <jolsa@redhat.com> wrote: > > > hi, > > could you please put explanation from first email > > into the patch changelog? > > > > cc-ing lkml > > > > thanks, > > jirka > > > OK, pasting it together: ook hum, your email's encoding kills my 'git am' :-\ also 'perf tools: Adjust symbols in VDSO' should go into the email subject I processed this patch by hand this time thanks, jirka > > --------------------------------------------------------------------------------------------------------------------------- > > 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 [flat|nested] 3+ messages in thread
* Re: [PATCH] Correctly handle symbols in VDSO 2014-04-09 15:35 ` Jiri Olsa @ 2014-04-09 16:13 ` Jiri Olsa 0 siblings, 0 replies; 3+ messages in thread From: Jiri Olsa @ 2014-04-09 16:13 UTC (permalink / raw) To: Vladimir Nikulichev Cc: Namhyung Kim, linux-perf-users, Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo, linux-kernel On Wed, Apr 09, 2014 at 05:35:46PM +0200, Jiri Olsa wrote: > On Wed, Apr 09, 2014 at 10:46:13AM +0400, Vladimir Nikulichev wrote: > > Hi, > > > > On Apr 8, 2014, at 7:41 PM, Jiri Olsa <jolsa@redhat.com> wrote: > > > > > hi, > > > could you please put explanation from first email > > > into the patch changelog? > > > > > > cc-ing lkml > > > > > > thanks, > > > jirka > > > > > > OK, pasting it together: > > ook > > hum, your email's encoding kills my 'git am' :-\ > also 'perf tools: Adjust symbols in VDSO' should go into the > email subject > > I processed this patch by hand this time actually I'll have to ask you to resend your patch with proper subject and coding, refer to: https://www.kernel.org/doc/Documentation/email-clients.txt "Emailed patches should be in ASCII or UTF-8 encoding only." Please CC lkml (linux-kernel@vger.kernel.org). Strangely enough, I don't see your patch there at the moment.. thanks, jirka ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-09 16:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <D6A5CDD8-F8F1-4C9D-8BCF-83A739FD6A2F@tbricks.com>
[not found] ` <87eh19y8cm.fsf@sejong.aot.lge.com>
[not found] ` <3C60FB26-A78B-4E37-B4A6-E6F7283CEB4C@tbricks.com>
2014-04-08 15:41 ` [PATCH] Correctly handle symbols in VDSO Jiri Olsa
[not found] ` <A7CC2084-4F71-436C-9AEC-394F66A4981E@tbricks.com>
2014-04-09 15:35 ` Jiri Olsa
2014-04-09 16:13 ` Jiri Olsa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®