[PATCH] D120335: [llvm-profgen] Generating probe-based non-CS profile.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 16:54:35 PST 2022


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:944
+    // doesn't belong to current context, filter them out.
+    if (!Probe->isBlock() || Count == 0)
+      continue;
----------------
wlei wrote:
> `Probe.isBlock()` check is hoisted from `extractProbesFromRange` to this for CS profile but Why doesn't add this check back for non-CS profile?
So we don't count callsite probes here since they are handled in `populateBoundarySamplesWithProbes`. Otherwise they will be double counted.

We don't do this for non-CS probe profile. This is to be consistent with non-CS dwarf implementation where we report zero count in `populateBoundarySamplesForAllFunctions`. I guess I can also do some refactoring to unify the two implementations. 



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120335



More information about the llvm-commits mailing list