diff options
author | Arnaldo Carvalho de Melo <acme@infradead.org> | 2010-02-25 12:57:40 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 16:01:23 -0700 |
commit | 84303658a8fd2bed8e27dacc25643a69dc7426fb (patch) | |
tree | 9bd0e13a475466253db699cfa7fcfbd433b47b28 /tools/perf/util | |
parent | c2b2df61e78aa5570473e2d46db6d88f5071b520 (diff) | |
download | kernel-common-84303658a8fd2bed8e27dacc25643a69dc7426fb.tar.gz kernel-common-84303658a8fd2bed8e27dacc25643a69dc7426fb.tar.bz2 kernel-common-84303658a8fd2bed8e27dacc25643a69dc7426fb.zip |
perf annotate: Defer allocating sym_priv->hist array
commit 628ada0cb03666dd463f7c25947eaccdf440c309 upstream
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.
Backported-from: 628ada0
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Anton Blanchard <anton@samba.org>
Acked-by: David Miller <davem@davemloft.net>
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>
LKML-Reference: <20100225155740.GB8553@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 72547b914ad2..fcb8919887ae 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -149,7 +149,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 8aded2356f79..400227a22d09 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -49,6 +49,8 @@ struct symbol { char name[0]; }; +void symbol__delete(struct symbol *self); + struct strlist; struct symbol_conf { |