perf annotate: Defer allocating sym_priv->hist array
authorArnaldo Carvalho de Melo <acme@infradead.org>
Thu, 25 Feb 2010 15:57:40 +0000 (12:57 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 25 Feb 2010 16:39:14 +0000 (17:39 +0100)
commit628ada0cb03666dd463f7c25947eaccdf440c309
tree2338cf888ccecb1bb9df32031cef43f527b05ca0
parent3846df2e0a99a2bf10023de0e9c1496592012d4c
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>
tools/perf/builtin-annotate.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h