wmi added a comment.
Herald added a subscriber: danielkiss.

> The early instrumentation also allows the inliner to duplicate probes for 
> inlined instances. When a probe along with the other instructions of a callee 
> function are inlined into its caller function, the GUID of the callee 
> function goes with the probe. This allows samples collected on inlined probes 
> to be reported for the original callee function.

Just get a question from reading the above. Suppose `A` only has one BB and the 
BB has one PseudoProbe in it. If function `A` is inlined into `B1` and `B2` and 
both `B1` and `B2` inlined into `C`, the PseudoProbe from `A` will have two 
copies in `C` both carrying GUID of `A`. How the samples collected from `A` 
inlined into `B1` inlined into `C` are categorized differently from `A` inlined 
into `B2` inlined into `C`, especially when debug information is not enabled 
(so no inline stack information in the binary)?



================
Comment at: llvm/include/llvm/Passes/PassBuilder.h:67-69
+    // Pseudo probe instrumentation should only work with autoFDO or no FDO.
+    assert(!this->PseudoProbeForProfiling || this->Action == NoAction ||
+           this->Action == SampleUse);
----------------
Need it to work with more types of action for example instrumentation FDO or cs 
instrumentation FDO. For instrumentation FDO optimized binary, we may want to 
collect AutoFDO profile for it for performance comparison, enhance the 
intrumentation profile with AutoFDO profile to make the profile more production 
representative, ...

Currently debug information based AutoFDO supports it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86502

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to