[PATCH 2/3] perf tools: Reset hists number of entries before collapsing

From: Frederic Weisbecker
Date: Sat Oct 15 2011 - 14:36:48 EST


When we collapse entries, we re-compute their total numbers
and period but we forget to reset the total number of entries
before.

Fix this so that the browser sees the correct number of entries.

Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
---
tools/perf/util/hist.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index bac6520..cef40d8 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -344,6 +344,7 @@ static void __hists__collapse_resort(struct hists *hists, bool threaded)

root = hists__get_rotate_entries_in(hists);
next = rb_first(root);
+ hists->nr_entries = 0;
hists->stats.total_period = 0;

while (next) {
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/