Skip to content

When firing rundown events we do not distinguish between generic overloads for jitted methods #87257

Open
@davmason

Description

@davmason

For each generic method we will have a reference instantiation and one instantiation for each value type, but we emit the same rundown event for all. Distinguishing between overloads (as we already do for R2R code) should be an easy win for profilers.

For example, the following method:

static T Test<T>(Test a, Test b)

Will emit these rundown events for T=char, T=int, and T=object. All have the same signature generic !!0 (!!0,!!0)


  <PrettyPrint>
    <Event MSec=   "572.2851" PID="35752" PName="ConsoleApp31" TID="38296" EventName="Method/LoadVerbose" MethodID="0x00007FFF6D205DB0" ModuleID="0x00007FFF6D0CCF48" MethodStartAddress="0x00007FFF6D004630" MethodSize="0x0000004C" MethodToken="0x06000007" MethodFlags="Generic, Jitted" MethodNamespace="ConsoleApp31.Program" MethodName="Test" MethodSignature="generic !!0  (!!0,!!0)" ClrInstanceID="10" ReJITID="0x00000000" OptimizationTier="MinOptJitted"/>
  </PrettyPrint>
 
  <PrettyPrint>
    <Event MSec=   "572.5086" PID="35752" PName="ConsoleApp31" TID="38296" EventName="Method/LoadVerbose" MethodID="0x00007FFF6D205ED0" ModuleID="0x00007FFF6D0CCF48" MethodStartAddress="0x00007FFF6D004690" MethodSize="0x00000043" MethodToken="0x06000007" MethodFlags="Generic, Jitted" MethodNamespace="ConsoleApp31.Program" MethodName="Test" MethodSignature="generic !!0  (!!0,!!0)" ClrInstanceID="10" ReJITID="0x00000000" OptimizationTier="MinOptJitted"/>
  </PrettyPrint>
 
  <PrettyPrint>
    <Event MSec=   "572.5952" PID="35752" PName="ConsoleApp31" TID="38296" EventName="Method/LoadVerbose" MethodID="0x00007FFF6D206018" ModuleID="0x00007FFF6D0CCF48" MethodStartAddress="0x00007FFF6D0046F0" MethodSize="0x00000098" MethodToken="0x06000007" MethodFlags="Generic, HasSharedGenericCode, Jitted" MethodNamespace="ConsoleApp31.Program" MethodName="Test" MethodSignature="generic !!0  (!!0,!!0)" ClrInstanceID="10" ReJITID="0x00000000" OptimizationTier="MinOptJitted"/>
  </PrettyPrint>

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tracing-coreclrenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions