Support profile instrumentation for inlinees #44372
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
The jit and runtime currently do not support instrumenting (BBINSTR) of inlined code. Enabling this may prove useful for a number of reasons -- for example we are currently not be able to observe the behavior of methods marked with aggressive inline attributes.
(This doesn't impact dynamic PGO as it instruments Tier0 code where inlining is disabled).
Outline of how to fix this:
allocMethodBlockCounts
(or introduce a new method)We could consider keeping inlinee counts separate from root method counts to avoid perturbing current IBC computations (collating all counts in one buffer will change which methods are considered hot by IBC). If we do this then count request and retrieval also need to be updated so the jit can indicate if it wants the counts for a root method or the counts for an inlinee. However this may make it hard to persist out the inlinee data as tooling is not expecting two sets of counts for methods.
At the same time we might want to suppress instrumentation for single-block inlinees to reduce the volume and runtime cost of counts.
So initially inlinee counts should be optional behavior until we can assess impact on IBC.
category:cq
theme:inlining
The text was updated successfully, but these errors were encountered: