[PATCH] D92998: [CSSPGO][llvm-profgen] Pseudo probe based CS profile generation
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 10:16:45 PST 2020
hoy added inline comments.
================
Comment at: llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test:16
+; CHECK: 4: 14
+
----------------
If you rebase on the latest, a checksum will be in presence here.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:412
+ getFunctionProfileForLeafProbe(PrefixContextId, Probe, Binary);
+ if (Probe->isDangling())
+ Count = 0;
----------------
Please add a comment about why a dangling probe gets a zero count.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:419
+ FunctionProfile.addHeadSamples(Count);
+ // Look up for the caller's functin profile
+ SmallVector<std::string, 16> LeafInlinedContext;
----------------
Nit: function
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:470
+ // frame's probe id, like:
+ // Inlined stack: [bar:3, foo:2], the ContextId will be "foo:1 @ bar"
+ StringRef LeafLoc = LeafInlinedContext[0];
----------------
You mean foo:2 @ bar?
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:478
+ OContextStr << LeafInlinedContext[I];
+ else
+ OContextStr << LeafFuncName.str();
----------------
Move this out of the loop to save the check?
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