diff options
-rw-r--r-- | Documentation/perf_counter/builtin-report.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 6003cc3b188d..86f23f0991f1 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c | |||
@@ -699,17 +699,18 @@ static void output__resort(void) | |||
699 | { | 699 | { |
700 | struct rb_node *next; | 700 | struct rb_node *next; |
701 | struct hist_entry *n; | 701 | struct hist_entry *n; |
702 | struct rb_root *tree = &hist; | ||
702 | 703 | ||
703 | if (sort__need_collapse) | 704 | if (sort__need_collapse) |
704 | next = rb_first(&collapse_hists); | 705 | tree = &collapse_hists; |
705 | else | 706 | |
706 | next = rb_first(&hist); | 707 | next = rb_first(tree); |
707 | 708 | ||
708 | while (next) { | 709 | while (next) { |
709 | n = rb_entry(next, struct hist_entry, rb_node); | 710 | n = rb_entry(next, struct hist_entry, rb_node); |
710 | next = rb_next(&n->rb_node); | 711 | next = rb_next(&n->rb_node); |
711 | 712 | ||
712 | rb_erase(&n->rb_node, &hist); | 713 | rb_erase(&n->rb_node, tree); |
713 | output__insert_entry(n); | 714 | output__insert_entry(n); |
714 | } | 715 | } |
715 | } | 716 | } |