|
@@ -334,39 +334,6 @@ static void hists__name_resort(struct hists *self, bool sort)
|
|
|
self->entries = tmp;
|
|
|
}
|
|
|
|
|
|
-static struct hist_entry *hists__find_entry(struct hists *self,
|
|
|
- struct hist_entry *he)
|
|
|
-{
|
|
|
- struct rb_node *n = self->entries.rb_node;
|
|
|
-
|
|
|
- while (n) {
|
|
|
- struct hist_entry *iter = rb_entry(n, struct hist_entry, rb_node);
|
|
|
- int64_t cmp = hist_entry__cmp(he, iter);
|
|
|
-
|
|
|
- if (cmp < 0)
|
|
|
- n = n->rb_left;
|
|
|
- else if (cmp > 0)
|
|
|
- n = n->rb_right;
|
|
|
- else
|
|
|
- return iter;
|
|
|
- }
|
|
|
-
|
|
|
- return NULL;
|
|
|
-}
|
|
|
-
|
|
|
-static void hists__match(struct hists *older, struct hists *newer)
|
|
|
-{
|
|
|
- struct rb_node *nd;
|
|
|
-
|
|
|
- for (nd = rb_first(&newer->entries); nd; nd = rb_next(nd)) {
|
|
|
- struct hist_entry *pos = rb_entry(nd, struct hist_entry, rb_node),
|
|
|
- *pair = hists__find_entry(older, pos);
|
|
|
-
|
|
|
- if (pair)
|
|
|
- hist__entry_add_pair(pos, pair);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
static struct perf_evsel *evsel_match(struct perf_evsel *evsel,
|
|
|
struct perf_evlist *evlist)
|
|
|
{
|
|
@@ -520,7 +487,7 @@ static void hists__compute_resort(struct hists *hists)
|
|
|
|
|
|
static void hists__process(struct hists *old, struct hists *new)
|
|
|
{
|
|
|
- hists__match(old, new);
|
|
|
+ hists__match(new, old);
|
|
|
|
|
|
if (show_baseline_only)
|
|
|
hists__baseline_only(new);
|