[PATCH] D92998: [CSSPGO][llvm-profgen] Pseudo probe based CS profile generation

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 09:46:12 PST 2020


wlei marked 5 inline comments as done.
wlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test:16
+; CHECK: 4: 14
+
 
----------------
hoy wrote:
> If you rebase on the latest, a checksum will be in presence here.
Thanks for reminding this, code to print checksum is added:
`  FunctionProile.setFunctionHash(LeafFuncDesc->FuncHash);`


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:412
+        getFunctionProfileForLeafProbe(PrefixContextId, Probe, Binary);
+    if (Probe->isDangling())
+      Count = 0;
----------------
hoy wrote:
> Please add a comment about why a dangling probe gets a zero count.
comments added


================
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];
----------------
hoy wrote:
> You mean foo:2 @ bar?
typo fixed


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:478
+      OContextStr << LeafInlinedContext[I];
+    else
+      OContextStr << LeafFuncName.str();
----------------
hoy wrote:
> Move this out of the loop to save the check?
Yeah, moved the last elements out of the loop.


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