Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608375 > unrolled thread

[PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

Started byAdrian Hunter <adrian.hunter@intel.com>
First post2017-03-24 13:30 +0100
Last post2017-03-25 02:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms() Adrian Hunter <adrian.hunter@intel.com> - 2017-03-24 13:30 +0100
    Re: [PATCH] perf auxtrace: Fix no_size logic in  addr_filter__resolve_kernel_syms() Andi Kleen <ak@linux.intel.com> - 2017-03-25 00:30 +0100
      Re: [PATCH] perf auxtrace: Fix no_size logic in  addr_filter__resolve_kernel_syms() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-25 02:00 +0100

#1608375 — [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

FromAdrian Hunter <adrian.hunter@intel.com>
Date2017-03-24 13:30 +0100
Subject[PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
Message-ID<towvV-1tO-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1609023 — Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

FromAndi Kleen <ak@linux.intel.com>
Date2017-03-25 00:30 +0100
SubjectRe: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
Message-ID<toGOB-pq-1@gated-at.bofh.it>
In reply to#1608375
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

[toc] | [prev] | [next] | [standalone]


#1609049 — Re: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-03-25 02:00 +0100
SubjectRe: [PATCH] perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
Message-ID<toIdI-1mI-7@gated-at.bofh.it>
In reply to#1609023
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web