/* --sort symbol */
-static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r,
- u64 ip_l, u64 ip_r)
+static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r)
{
+ u64 ip_l, ip_r;
+
if (!sym_l || !sym_r)
return cmp_null(sym_l, sym_r);
static int64_t
sort__sym_cmp(struct hist_entry *left, struct hist_entry *right)
{
- u64 ip_l, ip_r;
-
if (!left->ms.sym && !right->ms.sym)
return right->level - left->level;
- if (!left->ms.sym || !right->ms.sym)
- return cmp_null(left->ms.sym, right->ms.sym);
-
- if (left->ms.sym == right->ms.sym)
- return 0;
-
- ip_l = left->ms.sym->start;
- ip_r = right->ms.sym->start;
-
- return _sort__sym_cmp(left->ms.sym, right->ms.sym, ip_l, ip_r);
+ return _sort__sym_cmp(left->ms.sym, right->ms.sym);
}
static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym,
if (!from_l->sym && !from_r->sym)
return right->level - left->level;
- return _sort__sym_cmp(from_l->sym, from_r->sym, from_l->addr,
- from_r->addr);
+ return _sort__sym_cmp(from_l->sym, from_r->sym);
}
static int64_t
if (!to_l->sym && !to_r->sym)
return right->level - left->level;
- return _sort__sym_cmp(to_l->sym, to_r->sym, to_l->addr, to_r->addr);
+ return _sort__sym_cmp(to_l->sym, to_r->sym);
}
static int hist_entry__sym_from_snprintf(struct hist_entry *self, char *bf,