Expand PerfMap format to support metadata for symbol indexation (#53792)
authorTomáš Rylek <trylek@microsoft.com>
Thu, 1 Jul 2021 23:17:59 +0000 (01:17 +0200)
committerGitHub <noreply@github.com>
Thu, 1 Jul 2021 23:17:59 +0000 (01:17 +0200)
commite3dd9857748814c2d56672838657a367b70c2452
tree7a791da2da2c900ec4edcc160af1bddb3f3b2401
parent08a7b2382799082eedb94d70fca6c66eb75f2872
Expand PerfMap format to support metadata for symbol indexation (#53792)

I have expanded the PerfMap format produced by Crossgen2 and
R2RDump to produce metadata in form of pseudo-symbol records with
high addresses. In this version I have implemented four metadata
entries - output GUID, target OS, target architecture and perfmap
format version number.  I have verified for System.Private.CoreLib
and for the composite framework that Crossgen2 and R2RDump
produce identical metadata.

To facilitate a smooth transition to the new perfmap format, in
accordance with Juan's suggestion I have introduced a new command-line
option to explicitly specify the perfmap format revision. As of today,
0 corresponds to the legacy Crossgen1-style output where the
perfmap file name includes the {MVID} section, perfmap format #1
corresponds to current Crossgen2 with its new naming scheme.
As of today there are no differences in the file content.

Thanks

Tomas
17 files changed:
src/coreclr/tools/aot/ILCompiler.Diagnostics/AssemblyInfo.cs [new file with mode: 0644]
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
src/coreclr/tools/aot/ILCompiler.Diagnostics/PerfMapWriter.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/CodeGen/ReadyToRunObjectWriter.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/ObjectWriter/OutputInfoBuilder.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ObjectWriter/SymbolFileBuilder.cs
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
src/coreclr/tools/aot/crossgen2/CommandLineOptions.cs
src/coreclr/tools/aot/crossgen2/Program.cs
src/coreclr/tools/aot/crossgen2/Properties/Resources.resx
src/coreclr/tools/r2rdump/CommandLineOptions.cs
src/coreclr/tools/r2rdump/R2RDump.cs
src/coreclr/tools/r2rdump/R2RDump.sln
src/coreclr/tools/r2rdump/TextDumper.cs