[PATCH] D92998: [CSSPGO][llvm-profgen] Pseudo probe based CS profile generation
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 14:35:24 PST 2021
wmi added inline comments.
================
Comment at: llvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test:13-14
+; CHECK-NEXT: 1: 15
+; CHECK-NEXT: 2: 0
+; CHECK-NEXT: 3: 0
+; CHECK-NEXT: 4: 15
----------------
wlei wrote:
> wmi wrote:
> > In [main:2 @ foo], probes with 0 count are not dumped. In which case probe with 0 count will be dumped?
> The 0 count is for a dangling probe case to distinguish a missing count, see the ProfileGenerator.cpp:420
>
> Copied the comments for you to refer:
>
> ```
> // Drop the samples collected for a dangling probe since it's misleading.
> // We still report the probe but with a special zero count. The compiler
> // won't trust the zero count and will rely on the counts inference
> // algorithm to get the probe a reasonable count. Note that a zero count is
> // different from a missing count, where the latter really tells the
> // compiler that a probe is never executed.
> ```
> Note that a zero count is different from a missing count, where the latter really tells the compiler that a probe is never executed.
That is contrary to the debug info based profile where zero count for a line means the line is never executed. Missing count for a line means compiler has to infer the count. Why the probe based profile is implemented in such way?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92998/new/
https://reviews.llvm.org/D92998
More information about the llvm-commits
mailing list