[PATCH] D99788: [CSSPGO] Skip dangling probe value when computing profile summary
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 1 23:18:48 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc5605857bb77: [CSSPGO] Skip dangling probe value when computing profile summary (authored by wenlei).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99788/new/
https://reviews.llvm.org/D99788
Files:
llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
Index: llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
===================================================================
--- llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
+++ llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
@@ -68,8 +68,12 @@
if (FS.getHeadSamples() > MaxFunctionCount)
MaxFunctionCount = FS.getHeadSamples();
}
- for (const auto &I : FS.getBodySamples())
- addCount(I.second.getSamples());
+ for (const auto &I : FS.getBodySamples()) {
+ uint64_t Count = I.second.getSamples();
+ if (!sampleprof::FunctionSamples::ProfileIsProbeBased ||
+ (Count != sampleprof::FunctionSamples::InvalidProbeCount))
+ addCount(Count);
+ }
for (const auto &I : FS.getCallsiteSamples())
for (const auto &CS : I.second)
addRecord(CS.second, true);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99788.334900.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210402/3d02e740/attachment.bin>
More information about the llvm-commits
mailing list