Initial implementation of call chain statistics (#47547)
authorTomáš Rylek <trylek@microsoft.com>
Fri, 29 Jan 2021 20:10:31 +0000 (21:10 +0100)
committerGitHub <noreply@github.com>
Fri, 29 Jan 2021 20:10:31 +0000 (21:10 +0100)
commit96f65355e757b4539543dfc2c4afd9ab245baa12
tree52040f5b60fad838a153f6132d12366f3ca6cee1
parent55a5a0c2f6b9525f6ba3cdd744df0723524bf011
Initial implementation of call chain statistics (#47547)

Add support for producing "callchain profile quality map", a new
auxiliary output file describing code layout properties w.r.t.
a given call chain profile.

Sample output for System.Private.CoreLib:

CHARACTERISTIC            | PAIR COUNT | CALL COUNT | PERCENTAGE
----------------------------------------------------------------
ENTRIES TOTAL             |        291 |     266229 |     100.00
RESOLVED ENTRIES          |        267 |     260172 |      97.72
UNRESOLVED ENTRIES        |         24 |       6057 |       2.28
NEAR (INTRA-PAGE) CALLS   |        145 |     109055 |      40.96
FAR (CROSS-PAGE) CALLS    |        122 |     151117 |      56.76

Thanks

Tomas
src/coreclr/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/CallChainProfile.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/OutputInfoBuilder.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/ProfileFileBuilder.cs [new file with mode: 0644]
src/coreclr/tools/aot/crossgen2.sln
src/coreclr/tools/aot/crossgen2/Program.cs