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

[Mono] Initial metadata update support #45612

Merged
merged 31 commits into from
Jan 11, 2021
Merged

Conversation

lambdageek
Copy link
Member

@lambdageek lambdageek commented Dec 4, 2020

First part of support for metadata updates.

Contributes to #44806

The feature is off by default. To enable, build with /p:MonoMetadataUpdate=true (e.g. ./build.sh --os browser /p:MonoMetadataUpdate=true). There are samples in src/mono/netcore/sample/mbr (see the README - the samples aren't completely standalone and need some external tooling to build) for console (only tested on Mac and Linux) and wasm.

There's a demo at https://lambdageek.dev/dl0/

@ghost
Copy link

ghost commented Dec 4, 2020

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Issue Details

First part of support for metadata updates.

Contributes to #44806

The feature is off by default. To enable, build with /p:MonoMetadataUpdate=true (e.g. ./build.sh --os browser /p:MonoMetadataUpdate=true). There are samples in src/mono/netcore/sample/mbr (see the README - the samples aren't completely standalone and need some external tooling to build) for console (only tested on Mac and Linux) and wasm.

Author: lambdageek
Assignees: -
Labels:

area-VM-meta-mono

Milestone: -

@lambdageek lambdageek force-pushed the delta-wip branch 2 times, most recently from 08b642f to e1087a5 Compare December 7, 2020 01:28
@lambdageek lambdageek force-pushed the delta-wip branch 2 times, most recently from 0a18357 to 3c00733 Compare December 16, 2020 18:30
lambdageek and others added 12 commits January 6, 2021 11:47
Co-Authored-By: Bernhard Urban-Forster <lewurm@gmail.com>
Both samples depend on the roslynildiff tool which should be specified with a
RoslynILDiffFullPath property in the .csproj files for the projects.
In the runtime defines cmake ENABLE_METADATA_UPDATE option and sets a preprocessor flag.

In System.Private.CoreLib, defines FEATURE_METADATA_UPDATE and uses it to throw
a NotSupportedException from LoadMetadataUpdate
Also move execution engine initialization into the main update function and use
a MonoError to signal failures (such as if interp inlining is not turned off)
instead of asserting at startup.
Use the WasmApp.targets
Log all the unsupported edits, then cancel the update
Keep track of inserted/modified rows for each table in each delta.
This will help to use a simpler algorithm to locate effective table rows by
keeping track of the logical number of rows in the appended tables
We're going to need to walk backwards from the latest published delta
@lambdageek
Copy link
Member Author

@vargaz Addressed the feedback.

@BrzVlad any thoughts about the interp changes?

Give metadata updates a peek at the interp frames since the LMF so that it can
copy the InterpMethods that are currently executing

This only works with hybrid and full coop suspend.  Preemptive suspend will
need another mechanism.
Add a busy thread to demonstrate that interp frames since the last managed
frame are visible to the metadata update mechanism and the active method bodies are
copied before being invalidated.
@lambdageek
Copy link
Member Author

@BrzVlad @vargaz anything else you'd like to see as part of this PR? Or anything else you think is important to follow-up on? If not, could one of your approve?

@lambdageek lambdageek merged commit b0a316f into dotnet:master Jan 11, 2021
@lambdageek lambdageek deleted the delta-wip branch January 12, 2021 20:54
@ghost ghost locked as resolved and limited conversation to collaborators Feb 11, 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