Hi Namhyung,

On Apr 7, 2014, at 10:14 AM, Namhyung Kim <namhy...@kernel.org> wrote:

> Just one question below..
> 
>> 
>> ---------------------------------------------------------------------------------------------------------------------------
>> 
>> perf tools: Adjust symbols in VDSO
>> 
>> Signed-off-by: Vladimir Nikulichev <n...@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

Signed-off-by: Vladimir Nikulichev <n...@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);--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to