aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 2d0462d89a97..da8f8eb383a0 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -323,13 +323,20 @@ static void hists__baseline_only(struct hists *hists)
323 323
324static void hists__precompute(struct hists *hists) 324static void hists__precompute(struct hists *hists)
325{ 325{
326 struct rb_node *next = rb_first(&hists->entries); 326 struct rb_root *root;
327 struct rb_node *next;
328
329 if (sort__need_collapse)
330 root = &hists->entries_collapsed;
331 else
332 root = hists->entries_in;
327 333
334 next = rb_first(root);
328 while (next != NULL) { 335 while (next != NULL) {
329 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node); 336 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
330 struct hist_entry *pair = hist_entry__next_pair(he); 337 struct hist_entry *pair = hist_entry__next_pair(he);
331 338
332 next = rb_next(&he->rb_node); 339 next = rb_next(&he->rb_node_in);
333 if (!pair) 340 if (!pair)
334 continue; 341 continue;
335 342
@@ -457,7 +464,7 @@ static void hists__process(struct hists *old, struct hists *new)
457 hists__output_resort(new); 464 hists__output_resort(new);
458 } 465 }
459 466
460 hists__fprintf(new, true, 0, 0, stdout); 467 hists__fprintf(new, true, 0, 0, 0, stdout);
461} 468}
462 469
463static int __cmd_diff(void) 470static int __cmd_diff(void)
@@ -611,9 +618,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
611 618
612 setup_pager(); 619 setup_pager();
613 620
614 sort_entry__setup_elide(&sort_dso, symbol_conf.dso_list, "dso", NULL); 621 sort__setup_elide(NULL);
615 sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list, "comm", NULL);
616 sort_entry__setup_elide(&sort_sym, symbol_conf.sym_list, "symbol", NULL);
617 622
618 return __cmd_diff(); 623 return __cmd_diff();
619} 624}