]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - tools/perf/util/sort.c
perf report: Don't shadow inlined symbol with different addr range
[mirror_ubuntu-bionic-kernel.git] / tools / perf / util / sort.c
index a00eacdf02ed9d826f0d9d666c12edf526f2bec6..71ccc1599eaf0b9530e1867d40d98061dbd8ebb9 100644 (file)
@@ -226,8 +226,14 @@ static int64_t _sort__sym_cmp(struct symbol *sym_l, struct symbol *sym_r)
        if (sym_l == sym_r)
                return 0;
 
-       if (sym_l->inlined || sym_r->inlined)
-               return strcmp(sym_l->name, sym_r->name);
+       if (sym_l->inlined || sym_r->inlined) {
+               int ret = strcmp(sym_l->name, sym_r->name);
+
+               if (ret)
+                       return ret;
+               if ((sym_l->start <= sym_r->end) && (sym_l->end >= sym_r->start))
+                       return 0;
+       }
 
        if (sym_l->start != sym_r->start)
                return (int64_t)(sym_r->start - sym_l->start);