public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness
@ 2018-08-28  9:08 Sandipan Das
  2018-08-28  9:19 ` Naveen N. Rao
  2018-09-06 13:06 ` [tip:perf/core] " tip-bot for Sandipan Das
  0 siblings, 2 replies; 4+ messages in thread
From: Sandipan Das @ 2018-08-28  9:08 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel, jolsa, ravi.bangoria, naveen.n.rao, kamalesh

This makes sure that the SyS symbols are ignored for any powerpc
system, not just the big endian ones.

Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc")
Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
---
 tools/perf/arch/powerpc/util/sym-handling.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index 20e7d74d86cd..10a44e946f77 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -22,15 +22,16 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
 
 #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;
 
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
 	/* Skip over any initial dot */
 	if (*sym == '.')
 		sym++;
+#endif
 
 	/* Avoid "SyS" kernel syscall aliases */
 	if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3))
@@ -41,6 +42,7 @@ int arch__choose_best_symbol(struct symbol *syma,
 	return SYMBOL_A;
 }
 
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
 /* Allow matching against dot variants */
 int arch__compare_symbol_names(const char *namea, const char *nameb)
 {
-- 
2.14.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness
  2018-08-28  9:08 [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness Sandipan Das
@ 2018-08-28  9:19 ` Naveen N. Rao
  2018-08-30 18:16   ` Arnaldo Carvalho de Melo
  2018-09-06 13:06 ` [tip:perf/core] " tip-bot for Sandipan Das
  1 sibling, 1 reply; 4+ messages in thread
From: Naveen N. Rao @ 2018-08-28  9:19 UTC (permalink / raw)
  To: acme, Sandipan Das; +Cc: jolsa, kamalesh, linux-kernel, ravi.bangoria

Sandipan Das wrote:
> This makes sure that the SyS symbols are ignored for any powerpc
> system, not just the big endian ones.
> 
> Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc")
> Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> ---
>  tools/perf/arch/powerpc/util/sym-handling.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

LGTM. Thanks for the fix.
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

- Naveen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness
  2018-08-28  9:19 ` Naveen N. Rao
@ 2018-08-30 18:16   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-08-30 18:16 UTC (permalink / raw)
  To: Naveen N. Rao; +Cc: Sandipan Das, jolsa, kamalesh, linux-kernel, ravi.bangoria

Em Tue, Aug 28, 2018 at 02:49:15PM +0530, Naveen N. Rao escreveu:
> Sandipan Das wrote:
> > This makes sure that the SyS symbols are ignored for any powerpc
> > system, not just the big endian ones.
> > 
> > Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc")
> > Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> > Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> > Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> > ---
> >  tools/perf/arch/powerpc/util/sym-handling.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> LGTM. Thanks for the fix.
> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/core] perf probe powerpc: Ignore SyS symbols irrespective of endianness
  2018-08-28  9:08 [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness Sandipan Das
  2018-08-28  9:19 ` Naveen N. Rao
@ 2018-09-06 13:06 ` tip-bot for Sandipan Das
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Sandipan Das @ 2018-09-06 13:06 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, jolsa, ravi.bangoria, linux-kernel, tglx, mingo,
	naveen.n.rao, kamalesh, sandipan, hpa

Commit-ID:  fa694160cca6dbba17c57dc7efec5f93feaf8795
Gitweb:     https://git.kernel.org/tip/fa694160cca6dbba17c57dc7efec5f93feaf8795
Author:     Sandipan Das <sandipan@linux.ibm.com>
AuthorDate: Tue, 28 Aug 2018 14:38:48 +0530
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 30 Aug 2018 15:15:11 -0300

perf probe powerpc: Ignore SyS symbols irrespective of endianness

This makes sure that the SyS symbols are ignored for any powerpc system,
not just the big endian ones.

Reported-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Fixes: fb6d59423115 ("perf probe ppc: Use the right prefix when ignoring SyS symbols on ppc")
Link: http://lkml.kernel.org/r/20180828090848.1914-1-sandipan@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/powerpc/util/sym-handling.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index 20e7d74d86cd..10a44e946f77 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -22,15 +22,16 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
 
 #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;
 
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
 	/* Skip over any initial dot */
 	if (*sym == '.')
 		sym++;
+#endif
 
 	/* Avoid "SyS" kernel syscall aliases */
 	if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3))
@@ -41,6 +42,7 @@ int arch__choose_best_symbol(struct symbol *syma,
 	return SYMBOL_A;
 }
 
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
 /* Allow matching against dot variants */
 int arch__compare_symbol_names(const char *namea, const char *nameb)
 {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-06 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28  9:08 [PATCH] perf probe powerpc: Ignore SyS symbols irrespective of endianness Sandipan Das
2018-08-28  9:19 ` Naveen N. Rao
2018-08-30 18:16   ` Arnaldo Carvalho de Melo
2018-09-06 13:06 ` [tip:perf/core] " tip-bot for Sandipan Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox