diff options
author | Arnaldo Carvalho de Melo <acme@infradead.org> | 2010-02-25 12:57:40 -0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 17:39:14 +0100 |
commit | 628ada0cb03666dd463f7c25947eaccdf440c309 (patch) | |
tree | 2338cf888ccecb1bb9df32031cef43f527b05ca0 /tools/perf/util | |
parent | 3846df2e0a99a2bf10023de0e9c1496592012d4c (diff) | |
download | talos-op-linux-628ada0cb03666dd463f7c25947eaccdf440c309.tar.gz talos-op-linux-628ada0cb03666dd463f7c25947eaccdf440c309.zip |
perf annotate: Defer allocating sym_priv->hist array
Because symbol->end is not fixed up at symbol_filter time, only
after all symbols for a DSO are loaded, and that, for asm
symbols, may be bogus, causing segfaults when hits happen in
these symbols.
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Anton Blanchard <anton@samba.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: <stable@kernel.org> # for .33.x. Does not apply cleanly, needs backport.
LKML-Reference: <20100225155740.GB8553@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/symbol.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 7aab4e5f3669..323c0aea0a91 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -144,7 +144,7 @@ static struct symbol *symbol__new(u64 start, u64 len, const char *name) return self; } -static void symbol__delete(struct symbol *self) +void symbol__delete(struct symbol *self) { free(((void *)self) - symbol_conf.priv_size); } diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 1b4192ee5300..280dadd32a08 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -51,6 +51,8 @@ struct symbol { char name[0]; }; +void symbol__delete(struct symbol *self); + struct strlist; struct symbol_conf { |