[PATCH] D92896: [CSSPGO][llvm-profgen] Virtual unwinding with pseudo probe

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 16:44:49 PST 2021


wlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test:3
+
+; CHECK-UNWINDER: Binary(inline-cs-pseudoprobe.perfbin)'s Range Counter:
+; CHECK-UNWINDER:   (800, 858): 1
----------------
wmi wrote:
> wlei wrote:
> > wmi wrote:
> > > Add CHECK for context similar as noinline-cs-pseudoprobe.test below? It is good to make sure we get the context right w/wo inline.
> > Yeah, this is because the context is empty. added the `CHECK-UNWINDER-EMPTY` for this.
> Why the context is empty? To my understanding, for CSSPGO profile, the profile context will be the same no matter how the inlining is happening for the profiled binary, so I expect to see the context just like noinline-cs-pseudoprobe.test. What am I missing?
> 
> main:2
>  ...
> main:2 @ foo:8
>  ...
This is not the final context, the final context won't be empty. This is the output for the unwinder, has the context except for the leaf context. For unwinder, we record the leaf frame probe into the ranges, so the leaf context is not generated. In the profile generation patch(https://reviews.llvm.org/D92998), the range will be extract and the leaf context will be generated and appended.

Here for this case, because of inline, the contexts like [main @ foo @ bar] are all the leaf context, so the unwinder's context is empty.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92896



More information about the llvm-commits mailing list