Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

The reflection metadata generation within the compiler follows a simple algorithm: foreach module in compilation, for each type in the module, if the type generates metadata, generate metadata for it. But it turns out the list of modules that we start with is not sorted. This is not a problem for multithreaded stability, because none of this happens in the multithreaded phase, but it is a problem for delta patching - small change in a program can perturb the metadata blob for no good reason.

This sorts the list.

Cc @dotnet/ilc-contrib

The reflection metadata generation within the compiler follows a simple algorithm: foreach module in compilation, for each type in the module, if the type generates metadata, generate metadata for it. But it turns out the list of modules that we start with is not sorted. This is not a problem for multithreaded stability, because none of this happens in the multithreaded phase, but it is a problem for delta patching - small change in a program can perturb the metadata blob for no good reason.

This sorts the list.
@ghost
Copy link

ghost commented Dec 14, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

The reflection metadata generation within the compiler follows a simple algorithm: foreach module in compilation, for each type in the module, if the type generates metadata, generate metadata for it. But it turns out the list of modules that we start with is not sorted. This is not a problem for multithreaded stability, because none of this happens in the multithreaded phase, but it is a problem for delta patching - small change in a program can perturb the metadata blob for no good reason.

This sorts the list.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky MichalStrehovsky merged commit 6f3cbb6 into dotnet:main Dec 14, 2023
@MichalStrehovsky MichalStrehovsky deleted the modulesort branch December 14, 2023 21:51
@MichalStrehovsky
Copy link
Member Author

/backport to release/8.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7260181153

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.

2 participants