[PATCH] D121643: [llvm-profgen] On-demand pseudo probe decoding

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 18:20:09 PDT 2022


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:374
 
+void ProfileGeneratorBase::collectProfiledFunctions() {
+  std::unordered_set<const BinaryFunction *> ProfiledFunctions;
----------------
For CS profile,  the input contains CallStack + LBRStack, but here it only considers the addresses from LBRStack(Range + Branch) to compute profiledFunctions. Does it miss some functions whose address(frame) is only from CallStack?

For example, if we only have one following entry:
[main @ foo] : {rangeFrom : rangeTo}
 
Supposing rangeFrom and rangeTo only belong to `foo`(foo is not inlined to main), then the result of ProfiledFunctions only contains `foo` and misses `main`, right?

>From the term "ProfiledFunctions", it should be `foo`, but for CS inlining, I guess we still need the frame `main`?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121643



More information about the llvm-commits mailing list