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>
This commit is contained in:
Frederic Weisbecker
2010-08-22 20:05:22 +02:00
parent f4e7ac0a23
commit d2009c5130
4 changed files with 29 additions and 20 deletions

View File

@ -70,7 +70,7 @@ struct hist_entry {
struct hist_entry *pair;
struct rb_root sorted_chain;
};
struct callchain_node callchain[0];
struct callchain_root callchain[0];
};
enum sort_type {