perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc
Use the proper prefix when ignoring SyS symbols on ppc ABIv1. While at it, generalize symbol selection so architectures can implement their own logic. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/adf1f98b121ecaf292777fe5cc69fe1038feabce.1430217967.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
d233209833
commit
fb6d594231
@@ -17,3 +17,23 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
|
||||
ehdr.e_type == ET_DYN;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(_CALL_ELF) || _CALL_ELF != 2
|
||||
int arch__choose_best_symbol(struct symbol *syma,
|
||||
struct symbol *symb __maybe_unused)
|
||||
{
|
||||
char *sym = syma->name;
|
||||
|
||||
/* Skip over any initial dot */
|
||||
if (*sym == '.')
|
||||
sym++;
|
||||
|
||||
/* Avoid "SyS" kernel syscall aliases */
|
||||
if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3))
|
||||
return SYMBOL_B;
|
||||
if (strlen(sym) >= 10 && !strncmp(sym, "compat_SyS", 10))
|
||||
return SYMBOL_B;
|
||||
|
||||
return SYMBOL_A;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user