[PATCH] D89723: [CSSPGO][llvm-profgen]Context-sensitive profile data generation

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 10:07:32 PST 2020


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


================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:214-215
+
+// Class for sample unwinding
+class VirtualUnwinder {
+public:
----------------
wmi wrote:
> This virtual unwinder is not doing the classic unwinding thing. It is walking through the LBR stack of a LBR sample, based on the sample's callstack, and infer the callstack for each address range covered by the LBR sample. The comment can be more clear about it.
Thanks for your suggestion, more comments are added.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:62-70
+  A: (300, 0)
+  B: (0, 100)
+  C: (0, 200)
+
+  respectively. With these points, follwing logic finds two disjoint
+  region of
+
----------------
wmi wrote:
> Why there is region [A, B]: 300, but B: (0, 100) only has 100 sample count?
Sorry for the confusion. See the graph below, here B:(0, 100) is the boundary point, 0 means no samples begin at B, 100 means one sample(sample1) ends at B whose count is 100. I changed the explanation in the comment, see whether it's clear or not.

  |<--100-->|                  Sample1
  |<------200------>|          Sample2
  A         B       C


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89723



More information about the llvm-commits mailing list