Re: [PATCH] Correctly handle symbols in VDSO

From: Jiri Olsa
Date: Tue Apr 08 2014 - 11:41:32 EST


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@xxxxxxxxxx> wrote:
>
> > Just one question below..
> >
> >>
> >> ---------------------------------------------------------------------------------------------------------------------------
> >>
> >> perf tools: Adjust symbols in VDSO
> >>
> >> Signed-off-by: Vladimir Nikulichev <nvs@xxxxxxxxxxx>
> >>
> >> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/