Commit-ID: 3c916cc28ca31892d96215eaf99c1d592884961d
Gitweb: http://git.kernel.org/tip/3c916cc28ca31892d96215eaf99c1d592884961d
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Wed, 25 Aug 2010 17:18:35 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 25 Aug 2010 17:18:35 -0300
perf hists browser: Introduce "expand/collapse all callchains" action
When looking at a callchains enabled perf data file one can find it
tiresome to start with all callchains collapsed and then to have to go
one by one expanding them.
So associate 'E' with "Expand all callchains" and 'C' with "Collapse all
callchains".
This way now one can have the top level view and then switch to/from
having all callchains expanded.
More work is needed to allow expanding just from one branch down to its
leaves.
Reported-by: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/ui/browsers/hists.c | 112 +++++++++++++++++++++++++++++++++--
1 files changed, 106 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index c17611f..2fc1ba3 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -58,6 +58,11 @@ static char callchain_list__folded(const struct callchain_list *self)
return map_symbol__folded(&self->ms);
}
+static void map_symbol__set_folding(struct map_symbol *self, bool unfold)
+{
+ self->unfolded = unfold ? self->has_children : false;
+}
+
static int callchain_node__count_rows_rb_tree(struct callchain_node *self)
{
int n = 0;
@@ -196,11 +201,98 @@ static bool hist_browser__toggle_fold(struct hist_browser *self)
return ...