summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-08-22 20:05:22 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2010-08-22 20:43:17 +0200
commitd2009c5130b627d3efccae8ed36cd43450c8486d (patch)
tree22afece12b12600d9132ab76f8fe74425548351d /tools/perf/util/hist.c
parentf4e7ac0a233a4dc9b51345546ab69c64bb43e2c1 (diff)
downloadlinux-d2009c5130b627d3efccae8ed36cd43450c8486d.tar.gz
linux-d2009c5130b627d3efccae8ed36cd43450c8486d.tar.bz2
linux-d2009c5130b627d3efccae8ed36cd43450c8486d.zip
perf: Keep track of the max depth of a callchain
In order to implement callchains collapsing, we need to keep track of the maximum depth in a histogram tree of callchains. This way we'll avoid allocating an arbitrary temporary buffer size on callchain merge time. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index be22ae6ef055..e77ff772463e 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -87,7 +87,7 @@ static void hist_entry__add_cpumode_period(struct hist_entry *self,
static struct hist_entry *hist_entry__new(struct hist_entry *template)
{
- size_t callchain_size = symbol_conf.use_callchain ? sizeof(struct callchain_node) : 0;
+ size_t callchain_size = symbol_conf.use_callchain ? sizeof(struct callchain_root) : 0;
struct hist_entry *self = malloc(sizeof(*self) + callchain_size);
if (self != NULL) {