]>
Commit | Line | Data |
---|---|---|
80347ec8 GKH |
1 | From foo@baz Mon Oct 8 18:01:43 CEST 2018 |
2 | From: Sandipan Das <sandipan@linux.ibm.com> | |
3 | Date: Tue, 28 Aug 2018 14:38:48 +0530 | |
4 | Subject: perf probe powerpc: Ignore SyS symbols irrespective of endianness | |
5 | ||
6 | From: Sandipan Das <sandipan@linux.ibm.com> | |
7 | ||
8 | [ Upstream commit fa694160cca6dbba17c57dc7efec5f93feaf8795 ] | |
9 | ||
10 | This makes sure that the SyS symbols are ignored for any powerpc system, | |
11 | not just the big endian ones. | |
12 | ||
13 | Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | |
14 | Signed-off-by: Sandipan Das <sandipan@linux.ibm.com> | |
15 | Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> | |
16 | Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | |
17 | Cc: Jiri Olsa <jolsa@redhat.com> | |
18 | Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> | |
19 | Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc") | |
20 | Link: http://lkml.kernel.org/r/20180828090848.1914-1-sandipan@linux.ibm.com | |
21 | Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | |
22 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | tools/perf/arch/powerpc/util/sym-handling.c | 4 +++- | |
26 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
27 | ||
28 | --- a/tools/perf/arch/powerpc/util/sym-handling.c | |
29 | +++ b/tools/perf/arch/powerpc/util/sym-handling.c | |
30 | @@ -21,15 +21,16 @@ bool elf__needs_adjust_symbols(GElf_Ehdr | |
31 | ||
32 | #endif | |
33 | ||
34 | -#if !defined(_CALL_ELF) || _CALL_ELF != 2 | |
35 | int arch__choose_best_symbol(struct symbol *syma, | |
36 | struct symbol *symb __maybe_unused) | |
37 | { | |
38 | char *sym = syma->name; | |
39 | ||
40 | +#if !defined(_CALL_ELF) || _CALL_ELF != 2 | |
41 | /* Skip over any initial dot */ | |
42 | if (*sym == '.') | |
43 | sym++; | |
44 | +#endif | |
45 | ||
46 | /* Avoid "SyS" kernel syscall aliases */ | |
47 | if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3)) | |
48 | @@ -40,6 +41,7 @@ int arch__choose_best_symbol(struct symb | |
49 | return SYMBOL_A; | |
50 | } | |
51 | ||
52 | +#if !defined(_CALL_ELF) || _CALL_ELF != 2 | |
53 | /* Allow matching against dot variants */ | |
54 | int arch__compare_symbol_names(const char *namea, const char *nameb) | |
55 | { |