[PATCH] D113492: [llvm-profgen] Fix bug of split range branch sample

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 12:35:26 PST 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:177
+      if (ShowDetailedWarning)
+        WithColor::warning() << "Function " + F.first + " has no entry range\n";
+    }
----------------
wenlei wrote:
> This warning is a bit confusing.. Technically there's no such thing as function doesn't have an entry. How about this: Failed to determine function entry for xxx due to inconsistent name from symbol table and dwarf info. 
Thanks for the suggestions!


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:380-381
 
+  if (StartOffset > NextStartOffset)
+    return true;
+
----------------
hoy wrote:
> wlei wrote:
> > wenlei wrote:
> > > Moving this check is for printing symbols with zero size, right? 
> > > 
> > > What symbols have zero size?
> > Yes, all is due to the alias issues.  Those are two type: 1)C1 vs C2  2) undemangled symbol
> > 
> > ```
> > zero-size: _ZN5boost6threadC1Ev
> > <_ZN5boost6threadC2Ev>:
> > ```
> > 
> > ```
> > zero-size: numa_set_membind_v2
> > <numa_set_membind_v2_int>:
> > ```
> > See they are all right followed by their non-zero size alias.
> > 
> > But but not vice versa, remembering one of C1 or C2 can't be removed.
> > 
> > 
> On the second thought, what does this check do? I thought symbols are sorted based on their start offset before disassembled.
I see, this check is no need then,


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113492/new/

https://reviews.llvm.org/D113492



More information about the llvm-commits mailing list