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 hot reload reorg and beginning (disabled) add method support #61853

Merged
merged 20 commits into from
Nov 30, 2021

Commits on Nov 10, 2021

  1. checkpoint: allow adding methods to existing classes.

    Doesn't do anything yet.
    
    And needs more sanity checking (roslyn won't give us virtual or abstract
    methods, but we should check).
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    36d9693 View commit details
    Browse the repository at this point in the history
  2. fixme in loader

    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    0c4aa74 View commit details
    Browse the repository at this point in the history
  3. [metadata] Add mono_metadata_table_num_rows

    Returns the number of rows in a metadata table, taking into account metadata
    update deltas
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    c68b895 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0b7d77 View commit details
    Browse the repository at this point in the history
  5. Param attr lookups for deltas can have param_index == 0

    The params are added with a subsequent enclog "add param" function.
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    25e2fb8 View commit details
    Browse the repository at this point in the history
  6. WIP: start adding support for parameter additions.

    It "works" in that calling methods appears to work (ie direct token references
    seem to do the right thing).
    
    Primarily this is because the param table additions are not that interesting.
    All the good stuff is in the method signature (which is just in the blob heap).
    
    Presumably anything that actually needs parameter attributes, or anything that
    uses reflection to look at the parameters, will break.
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    099edb5 View commit details
    Browse the repository at this point in the history
  7. WIP: add MethodDef -> TypeDef lookup

    Allows calling non-public methods, which are now assigned the correct parent
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    6cbee0b View commit details
    Browse the repository at this point in the history
  8. Add hot reload test for lambda capturing this

    Lambdas that only capture `this` (and not local variables or arguments) compile
    to a private instance method in the enclosing class.  So it is enough to
    support EnC deltas that add methods.
    lambdageek committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    8cfb9fb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    287654e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6336699 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2021

  1. [hot_reload] Allocate modifiable tables in DeltaInfo

    This is the foundation for a new approach for metadata lookups.
    Instead of using an immutable model (each lookup traverses every delta to find
    the most up to date version of each table row), we are going to create a
    complete updated table for each generation and only do the lookup in the latest
    exposed generation directly.  (This is essentially the CoreCLR model).
    
    This commit is just the first foundations: we allocate the tables and copy over
    the previous generations' rows and zero out any rows that will be inserted.
    Delta applications and lookups have not been updated yet.
    
    As a slight optimization, tables that don't have modified or added rows are not
    copied from the base image.  If a generation modifies or adds rows, from that
    point forward, each subsequent generation will copy the table.
    
    We could be a bit more thrifty with copying, but it will complicate lookups.
    Also eventually we will try to deallocate the pools for generations that are
    older than no thread needs anymore.
    
    Metadata heaps are still looked up in each delta directly - heap combining does
    not seem necessary yet.
    lambdageek committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    cdfb9a7 View commit details
    Browse the repository at this point in the history
  2. [mini] Allow MONO_VERBOSE_METHOD='*:*'

    Implement method name wildcard matching for method descriptions
    
    Globbing doesn't work because we don't have g_pattern_match_simple in eglib.
    But a plain '*' wildcard does work.
    lambdageek committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    4b250b9 View commit details
    Browse the repository at this point in the history
  3. populate mutated table rows

    leave suppressed columns unchanged
    lambdageek committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    cdcf003 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. Configuration menu
    Copy the full SHA
    ac0ac83 View commit details
    Browse the repository at this point in the history
  2. cleanup: remove of effective_table calculation

    The row index doesn't change in the new scheme, pass it by value
    lambdageek committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    25253f7 View commit details
    Browse the repository at this point in the history
  3. cleanup: Remove relative_delta_index from component API

    It's only used internally by the update logic
    lambdageek committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    38b17da View commit details
    Browse the repository at this point in the history
  4. cleanup: Pass DeltaInfo to relative_delta_index

    don't compute it from the dmeta image
    lambdageek committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    d1c1c8e View commit details
    Browse the repository at this point in the history
  5. cleanup: Store a list of DeltaInfo in the BaselineInfo

    Instead of storing a list of delta images and then relying on delta_info_lookup
    to find the DeltaInfo, just store them directly on the baseline info.
    
    This changes the cleanup responsibilities a bit.  Now we destroy the DeltaInfo
    when we are iterate through the delta infos when we close the baseline image,
    instead of when we remove the delta_image_to_info hashtable entry.
    lambdageek committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    629075d View commit details
    Browse the repository at this point in the history
  6. Turn off method addition support, for now

    Just want to get the cleanups enabled for now
    lambdageek committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    3114871 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Configuration menu
    Copy the full SHA
    6e56f85 View commit details
    Browse the repository at this point in the history