lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 17 Nov 2009 17:18:35 GMT
From:	tip-bot for Nick Piggin <npiggin@...e.de>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	efault@....de, npiggin@...e.de, fweisbec@...il.com,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/urgent] perf annotate: Allocate history size correctly

Commit-ID:  d62d77fd18cc82e839e49b7ef3360e4411f7d2e5
Gitweb:     http://git.kernel.org/tip/d62d77fd18cc82e839e49b7ef3360e4411f7d2e5
Author:     Nick Piggin <npiggin@...e.de>
AuthorDate: Tue, 17 Nov 2009 12:29:38 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 17 Nov 2009 16:47:09 +0100

perf annotate: Allocate history size correctly

Symbol offset history table size does not get updated properly
when it is being resized. This leads to garbage results in
perf annotate.

Signed-off-by: Nick Piggin <npiggin@...e.de>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Mike Galbraith <efault@....de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 tools/perf/util/symbol.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 226f44a..cbac575 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -227,6 +227,10 @@ static int dso__load_kallsyms(struct dso *self, symbol_filter_t filter, int v)
 			      *curr = rb_entry(nd, struct symbol, rb_node);
 
 		prev->end = curr->start - 1;
+		if (prev->hist) {
+			free(prev->hist);
+			prev->hist = calloc(sizeof(u64), prev->end - prev->start);
+		}
 		prevnd = nd;
 	}
 
@@ -883,6 +887,10 @@ static inline void dso__fill_symbol_holes(struct dso *self)
 					pos->end = prev->end;
 				else if (hole)
 					pos->end = prev->start - 1;
+				if (pos->hist) {
+					free(pos->hist);
+					pos->hist = calloc(sizeof(u64), pos->end - pos->start);
+				}
 			}
 		}
 		prev = pos;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ