Repository navigation
ECMA-335 metadata in native AOT experiment - #135195
MichalStrehovsky wants to merge 2 commits into
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
Register the combined string set in each metadata builder, compact serialized roots, and point their #Strings stream headers at one trailing shared heap. Keep inspection DLLs self-contained. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8bf03cc8-5e10-4bcd-acb1-61fab4910d78
|
Hmm, this looks interesting. @jkotas do you have an opinion whether we should pursue this? The motivation is code sharing of the reflection stack. As expected it will be a size regression... but smaller than I expected. Size statisticsPull request #135195
|
|
I think the NAOT format is different in two ways:
Eliminating the structural differences makes sense to me. Fix the format so that the metadata reader API is nearly same shape as S.R.Metadata. It should enable easier sharing of the reflection code that builds on top of it. I am not sure whether we want to get rid of the encoding differences. It is both about the encoding overhead but also about the size of the code to decode it all that is not small either if we just take S.R.Metadata reader as is. Also, I do not think we need to maintain the support for resolving type and member refs in NAOT. I do not expect the native metadata split over multiple binaries to ever come back. We should be able to drop all that. The idea would be to keep the native metadata as simple and differentiated as possible so that it can justify its existence. |
|
Makes sense, thank you! I'll take a look at eliminating the unnecessary structural differences. I'm not convinced taking S.R.Metadata for decoding would be size regression though - the variable length records in the native format make decoding the native AOT format more costly and I would expect all of the variable sized integer decoding to be quite expensive size-wise. |
Native AOT has its own metadata format because it's smaller. But this makes it more difficult to share reflection stack with CoreCLR. How much size are we getting from the custom format in reality?
Just opening for measurements, Copilot makes it trivial to experiment...
More to investigate:
Knowns problems: