提交 81833130 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

perf tools: elf_sym__is_function() should accept "zero" sized functions

Asm routines that end up having size equal to zero are not really
zero sized, and as now we do kernel_maps__fixup_sym_end, at least
for kernel routines this gets fixed.

A similar fixup needs to be done for the userspace bits as well,
but as this fixup started only because in /proc/kallsyms we don't
have the end address nor the function size, it appeared here first.
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1254796503-27203-1-git-send-email-acme@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 ee949a86
...@@ -324,8 +324,7 @@ static inline int elf_sym__is_function(const GElf_Sym *sym) ...@@ -324,8 +324,7 @@ static inline int elf_sym__is_function(const GElf_Sym *sym)
{ {
return elf_sym__type(sym) == STT_FUNC && return elf_sym__type(sym) == STT_FUNC &&
sym->st_name != 0 && sym->st_name != 0 &&
sym->st_shndx != SHN_UNDEF && sym->st_shndx != SHN_UNDEF;
sym->st_size != 0;
} }
static inline int elf_sym__is_label(const GElf_Sym *sym) static inline int elf_sym__is_label(const GElf_Sym *sym)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册