Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial PDB / PerfMap support in Crossgen2 + System.Private.CoreLib switchover to use Crossgen2 #47019

Merged
merged 9 commits into from
Jan 16, 2021

Conversation

trylek
Copy link
Member

@trylek trylek commented Jan 14, 2021

(*) Move PDB writer support out of R2RDump to a new assembly ILCompiler.Diagnostics;

(*) Add initial PerfMap writer support parallel to PDB emitter;

(*) Add Crossgen2 support for emitting PDB / PerfMap using the ILCompiler.Diagnostics assembly;

(*) Add support for PDB generation to R2RTest;

(*) Add support for optional PDB generation to the src\tests\build.cmd script (PDB is only supported on Windows).

Thanks

Tomas

@trylek
Copy link
Member Author

trylek commented Jan 14, 2021

/cc @dotnet/crossgen-contrib

@@ -205,6 +226,20 @@ public void SaveCsv(string nodeStatsCsvFileName, string mapCsvFileName)
}
}

public void SavePdb(string pdbPath, string dllFileName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird having MapFileBuilder be the thing that writes PDBs and Perf maps since its purpose is to write a text summary file at the end of compilation. The map file builder's data structures at this point are a nice model of node to file location which makes it handy for these purposes. Maybe we could split the concepts into a class containing mapping details (shareable by map, perfmap, pdb generation)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9th commit - I have split the logic into an "output file info collector" (OutputInfoBuilder) and the actual emitters using it - MapFileBuilder and SymbolFileBuilder, thanks for the suggestion.

@mangod9
Copy link
Member

mangod9 commented Jan 15, 2021

Appears there are still some lingering issues on x86?

Based on Simon's suggestion I moved the PDB / PerfMap-specific code
to a new file SymbolFileBuilder as I concur that its squatting in
the MapFileBuilder was somewhat hacky. Both classes use a new helper
class ObjectInfoBuilder that collects the information common to
both - I was reluctant to make it a base class of the *FileBuilder's
as we'd have to collect all the elements twice.

Thanks

Tomas
@trylek
Copy link
Member Author

trylek commented Jan 16, 2021

I have addressed initial Manish's and Simon's PR feedback and the change finally passes PR testing. I have launched an outerloop run and I believe the change is ready to be merged in. Please take another look when you have a chance and let me know what additional comments need addressing before this goes in.

Copy link
Contributor

@nattress nattress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome to me 😎 Thanks Tomas!

@trylek trylek merged commit ea4f5f2 into dotnet:master Jan 16, 2021
@trylek trylek deleted the PerfMapWriter branch January 16, 2021 10:24
@ghost ghost locked as resolved and limited conversation to collaborators Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants