Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-diff.c
index 2d0462d89a972ffde8d1ef24e1c9262c45cb3ac7..da8f8eb383a0bea2b7ddefe923836969acbd65fe 100644 (file)
@@ -323,13 +323,20 @@ static void hists__baseline_only(struct hists *hists)
 
 static void hists__precompute(struct hists *hists)
 {
-       struct rb_node *next = rb_first(&hists->entries);
+       struct rb_root *root;
+       struct rb_node *next;
+
+       if (sort__need_collapse)
+               root = &hists->entries_collapsed;
+       else
+               root = hists->entries_in;
 
+       next = rb_first(root);
        while (next != NULL) {
-               struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node);
+               struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
                struct hist_entry *pair = hist_entry__next_pair(he);
 
-               next = rb_next(&he->rb_node);
+               next = rb_next(&he->rb_node_in);
                if (!pair)
                        continue;
 
@@ -457,7 +464,7 @@ static void hists__process(struct hists *old, struct hists *new)
                hists__output_resort(new);
        }
 
-       hists__fprintf(new, true, 0, 0, stdout);
+       hists__fprintf(new, true, 0, 0, 0, stdout);
 }
 
 static int __cmd_diff(void)
@@ -611,9 +618,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
 
        setup_pager();
 
-       sort_entry__setup_elide(&sort_dso, symbol_conf.dso_list, "dso", NULL);
-       sort_entry__setup_elide(&sort_comm, symbol_conf.comm_list, "comm", NULL);
-       sort_entry__setup_elide(&sort_sym, symbol_conf.sym_list, "symbol", NULL);
+       sort__setup_elide(NULL);
 
        return __cmd_diff();
 }