All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
@ 2017-03-24 12:15 Adrian Hunter
  2017-03-24 23:20 ` Andi Kleen
  2017-03-28  5:50 ` [tip:perf/core] " tip-bot for Adrian Hunter
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Hunter @ 2017-03-24 12:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Andi Kleen; +Cc: linux-kernel

Address filtering with kernel symbols incorrectly resulted in the error
"Cannot determine size of symbol" because the no_size logic was the wrong
way around.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.9+
---


I thought I sent this ages ago, but I can't see it anywhere :-/


 tools/perf/util/auxtrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index c5a6e0b12452..78bd632f144d 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
 		filt->addr = start;
 		if (filt->range && !filt->size && !filt->sym_to) {
 			filt->size = size;
-			no_size = !!size;
+			no_size = !size;
 		}
 	}
 
@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
 		if (err)
 			return err;
 		filt->size = start + size - filt->addr;
-		no_size = !!size;
+		no_size = !size;
 	}
 
 	/* The very last symbol in kallsyms does not imply a particular size */
-- 
1.9.1

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

* Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
  2017-03-24 12:15 [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Adrian Hunter
@ 2017-03-24 23:20 ` Andi Kleen
  2017-03-25  0:58   ` Arnaldo Carvalho de Melo
  2017-03-28  5:50 ` [tip:perf/core] " tip-bot for Adrian Hunter
  1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2017-03-24 23:20 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, linux-kernel

On Fri, Mar 24, 2017 at 02:15:52PM +0200, Adrian Hunter wrote:
> Address filtering with kernel symbols incorrectly resulted in the error
> "Cannot determine size of symbol" because the no_size logic was the wrong
> way around.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> Cc: stable@vger.kernel.org # v4.9+
> ---

Tested-by: Andi Kleen <ak@linux.intel.com>

Fixes my problems with tracing kernel with PT with filtering.

-Andi

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

* Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
  2017-03-24 23:20 ` Andi Kleen
@ 2017-03-25  0:58   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-25  0:58 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Adrian Hunter, linux-kernel

Em Fri, Mar 24, 2017 at 04:20:12PM -0700, Andi Kleen escreveu:
> On Fri, Mar 24, 2017 at 02:15:52PM +0200, Adrian Hunter wrote:
> > Address filtering with kernel symbols incorrectly resulted in the error
> > "Cannot determine size of symbol" because the no_size logic was the wrong
> > way around.
> > 
> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> > Cc: stable@vger.kernel.org # v4.9+
> > ---
> 
> Tested-by: Andi Kleen <ak@linux.intel.com>

Thanks, applied.

- Arnaldo
 
> Fixes my problems with tracing kernel with PT with filtering.
> 
> -Andi

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

* [tip:perf/core] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
  2017-03-24 12:15 [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Adrian Hunter
  2017-03-24 23:20 ` Andi Kleen
@ 2017-03-28  5:50 ` tip-bot for Adrian Hunter
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Adrian Hunter @ 2017-03-28  5:50 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: tglx, acme, adrian.hunter, mingo, linux-kernel, ak, hpa

Commit-ID:  c3a0bbc7ad7598dec5a204868bdf8a2b1b51df14
Gitweb:     http://git.kernel.org/tip/c3a0bbc7ad7598dec5a204868bdf8a2b1b51df14
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Fri, 24 Mar 2017 14:15:52 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 27 Mar 2017 11:58:08 -0300

perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

Address filtering with kernel symbols incorrectly resulted in the error
"Cannot determine size of symbol" because the no_size logic was the wrong
way around.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Andi Kleen <ak@linux.intel.com>
Cc: stable@vger.kernel.org # v4.9+
Link: http://lkml.kernel.org/r/1490357752-27942-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/auxtrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index c5a6e0b1..78bd632 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
 		filt->addr = start;
 		if (filt->range && !filt->size && !filt->sym_to) {
 			filt->size = size;
-			no_size = !!size;
+			no_size = !size;
 		}
 	}
 
@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)
 		if (err)
 			return err;
 		filt->size = start + size - filt->addr;
-		no_size = !!size;
+		no_size = !size;
 	}
 
 	/* The very last symbol in kallsyms does not imply a particular size */

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

end of thread, other threads:[~2017-03-28  5:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24 12:15 [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Adrian Hunter
2017-03-24 23:20 ` Andi Kleen
2017-03-25  0:58   ` Arnaldo Carvalho de Melo
2017-03-28  5:50 ` [tip:perf/core] " tip-bot for Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.