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

src: include Environment in snapshot #32761

Closed
wants to merge 8 commits into from

Commits on May 8, 2020

  1. src: introduce BaseObject base FunctionTemplate

    This enables us to tell whether a JS bindings object is associated
    with a `BaseObject` or not.
    addaleax committed May 8, 2020
    Copy the full SHA
    3fce8a8 View commit details
    Browse the repository at this point in the history
  2. src: collect external references for snapshot

    Gather external references from the different native modules that
    are loaded during bootstrapping, for inclusion in the snapshot.
    addaleax committed May 8, 2020
    Copy the full SHA
    1ce19a5 View commit details
    Browse the repository at this point in the history
  3. lib,src: fix process.features.cached_builtins when snapshotted

    This value is not a constant, in the sense that its value when
    running `node_mksnapshot` and when running the default `node` binary
    are different.
    addaleax committed May 8, 2020
    Copy the full SHA
    56f2556 View commit details
    Browse the repository at this point in the history
  4. buffer: refactor zero-fill-field passing

    Instead of storing the zero-fill-field as a fixed `ArrayBuffer`
    on the binding, only load it via a function call once bootstrapping
    is complete. This makes sure that the value is set correctly
    after loading from a snapshot (i.e. that the accessor for the
    field is stored in the snapshot, not the field itself).
    addaleax committed May 8, 2020
    Copy the full SHA
    4d8456c View commit details
    Browse the repository at this point in the history
  5. deps: V8: cherry-pick bb9f0c2b2fe9

    Original commit message:
    
        [snapshot] Improve snapshot docs and error printing
    
        - Minor improvements to the documentation for snapshotting.
        - Add newlines to printed errors where necessary.
    
        Change-Id: I822e7e850adb67eae73b51c23cf34e40ba3106f0
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144954
        Reviewed-by: Toon Verwaest <verwaest@chromium.org>
        Commit-Queue: Toon Verwaest <verwaest@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#67111}
    
    Refs: v8/v8@bb9f0c2
    addaleax committed May 8, 2020
    Copy the full SHA
    2a70893 View commit details
    Browse the repository at this point in the history
  6. deps: V8: cherry-pick ea0719b8ed08

    Original commit message:
    
        [snapshot] Do not defer ArrayBuffers during snapshotting
    
        ArrayBuffer instances are serialized by first re-assigning a index
        to the backing store field, then serializing the object, and then
        storing the actual backing store address again (and the same for the
        ArrayBufferExtension). If serialization of the object itself is deferred,
        the real backing store address is written into the snapshot, which cannot be
        processed when deserializing, leading to a crash.
    
        This fixes this by not deferring ArrayBuffer serialization and adding a DCHECK
        for the crash that previously occurred.
    
        Change-Id: Id9bea8268061bd0770cde7bfeb6695248978f994
        Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144123
        Commit-Queue: Jakob Gruber <jgruber@chromium.org>
        Reviewed-by: Dan Elphick <delphick@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#67114}
    
    Refs: v8/v8@ea0719b
    addaleax committed May 8, 2020
    Copy the full SHA
    52b7102 View commit details
    Browse the repository at this point in the history
  7. deps: V8: cherry-pick 9baf2865671c

    Original commit message:
    
        rehash JSMap and JSSet during deserialization
    
        To rehash JSMap and JSSet, we simply replace the backing store
        with a new one created with the new hash.
    
        Bug: v8:9187
    
    Refs: joyeecheung/v8@9baf286
    joyeecheung authored and addaleax committed May 8, 2020
    Copy the full SHA
    4bc3d2c View commit details
    Browse the repository at this point in the history
  8. src: include Environment in snapshot

    This snapshots a lot more data for startup than what we did previously
    for increased startup performance.
    
                                                                                           confidence improvement accuracy (*)   (**)  (***)
        misc/startup.js mode='process' script='benchmark/fixtures/require-cachable' dur=1        ***      9.73 %       ±3.78% ±5.03% ±6.54%
        misc/startup.js mode='process' script='test/fixtures/semicolon' dur=1                    ***     36.11 %       ±3.91% ±5.23% ±6.86%
    addaleax committed May 8, 2020
    Copy the full SHA
    8af28fe View commit details
    Browse the repository at this point in the history