1. 01 Dec, 2017 1 commit
  2. 26 Sep, 2017 3 commits
    • Yang Guo's avatar
      Reland "[snapshot] include version string in the startup snapshot." · dc7b2b2b
      Yang Guo authored
      This is a reland of 629406d1
      Original change's description:
      > [snapshot] include version string in the startup snapshot.
      > 
      > This is to easier diagnose build issues involving the snapshot.
      > Sample error message for mismatching snapshot:
      > 
      > #
      > # Fatal error in ../../src/snapshot/snapshot-common.cc, line 286
      > # Version mismatch between V8 binary and snapshot.
      > #   V8 binary version: 6.3.1 (candidate)
      > #    Snapshot version: 6.3.0 (candidate)
      > # The snapshot consists of 2820444 bytes and contains 1 contexts.
      > #
      > 
      > 
      > R=machenbach@chromium.org
      > 
      > Bug: chromium:764327
      > Change-Id: Icdc7aeac77819b113985b424feda814a072d5406
      > Reviewed-on: https://chromium-review.googlesource.com/684295
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Commit-Queue: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48161}
      
      Bug: chromium:764327
      Change-Id: I3721689824e0a6909eede86d0829dc258ae40c4d
      Reviewed-on: https://chromium-review.googlesource.com/684494Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48164}
      dc7b2b2b
    • Yang Guo's avatar
      Revert "[snapshot] include version string in the startup snapshot." · dc64a731
      Yang Guo authored
      This reverts commit 629406d1.
      
      Reason for revert: cross platform builds break.
      
      Original change's description:
      > [snapshot] include version string in the startup snapshot.
      > 
      > This is to easier diagnose build issues involving the snapshot.
      > Sample error message for mismatching snapshot:
      > 
      > #
      > # Fatal error in ../../src/snapshot/snapshot-common.cc, line 286
      > # Version mismatch between V8 binary and snapshot.
      > #   V8 binary version: 6.3.1 (candidate)
      > #    Snapshot version: 6.3.0 (candidate)
      > # The snapshot consists of 2820444 bytes and contains 1 contexts.
      > #
      > 
      > 
      > R=​machenbach@chromium.org
      > 
      > Bug: chromium:764327
      > Change-Id: Icdc7aeac77819b113985b424feda814a072d5406
      > Reviewed-on: https://chromium-review.googlesource.com/684295
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Commit-Queue: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48161}
      
      TBR=machenbach@chromium.org,yangguo@chromium.org
      
      Change-Id: I35a9b575e4f7fe5c45c9dc6f9e774c3e6d30049c
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:764327
      Reviewed-on: https://chromium-review.googlesource.com/684315Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48162}
      dc64a731
    • Yang Guo's avatar
      [snapshot] include version string in the startup snapshot. · 629406d1
      Yang Guo authored
      This is to easier diagnose build issues involving the snapshot.
      Sample error message for mismatching snapshot:
      
      #
      # Fatal error in ../../src/snapshot/snapshot-common.cc, line 286
      # Version mismatch between V8 binary and snapshot.
      #   V8 binary version: 6.3.1 (candidate)
      #    Snapshot version: 6.3.0 (candidate)
      # The snapshot consists of 2820444 bytes and contains 1 contexts.
      #
      
      
      R=machenbach@chromium.org
      
      Bug: chromium:764327
      Change-Id: Icdc7aeac77819b113985b424feda814a072d5406
      Reviewed-on: https://chromium-review.googlesource.com/684295Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48161}
      629406d1
  3. 19 Sep, 2017 1 commit
  4. 30 Aug, 2017 1 commit
    • jgruber's avatar
      Reland "[snapshot] Move builtins to dedicated snapshot area" · 70a51638
      jgruber authored
      This is a reland of 49e3bfd5
      Original change's description:
      > [snapshot] Move builtins to dedicated snapshot area
      > 
      > As a first step towards lazy builtin deserialization, this CL moves
      > builtins to their own dedicated area in the snapshot blob, physically
      > located after startup data and before context-specific data.
      > 
      > The startup- and partial serializers now serialize all seen builtins as
      > references, i.e. they only encode the relevant builtin id (taking care
      > to preserve special behavior around the interpreter trampoline and
      > CompileLazy). Builtins are later fully serialized by the
      > BuiltinSerializer. The separate blobs are finally glued together by
      > CreateSnapshotBlob.
      > 
      > Deserialization takes the same steps: when we see builtin reference
      > bytecodes before builtins have been deserialized, we push to a list of
      > deferred builtin references. After builtin deserialization, this list is
      > iterated and all builtin references are fixed up.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      > Reviewed-on: https://chromium-review.googlesource.com/610225
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47596}
      
      Bug: v8:6624
      Change-Id: I8bfac56c482d992987c270bf0fea7acd9e4ca0c7
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/638271Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47705}
      70a51638
  5. 28 Aug, 2017 1 commit
    • Michael Hablich's avatar
      Revert "[snapshot] Move builtins to dedicated snapshot area" · a588411e
      Michael Hablich authored
      This reverts commit 49e3bfd5.
      
      Reason for revert: Primary suspect for blocked roll: 759552
      
      Original change's description:
      > [snapshot] Move builtins to dedicated snapshot area
      > 
      > As a first step towards lazy builtin deserialization, this CL moves
      > builtins to their own dedicated area in the snapshot blob, physically
      > located after startup data and before context-specific data.
      > 
      > The startup- and partial serializers now serialize all seen builtins as
      > references, i.e. they only encode the relevant builtin id (taking care
      > to preserve special behavior around the interpreter trampoline and
      > CompileLazy). Builtins are later fully serialized by the
      > BuiltinSerializer. The separate blobs are finally glued together by
      > CreateSnapshotBlob.
      > 
      > Deserialization takes the same steps: when we see builtin reference
      > bytecodes before builtins have been deserialized, we push to a list of
      > deferred builtin references. After builtin deserialization, this list is
      > iterated and all builtin references are fixed up.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      > Reviewed-on: https://chromium-review.googlesource.com/610225
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47596}
      
      TBR=yangguo@chromium.org,mlippautz@chromium.org,jgruber@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:6624
      Change-Id: I9906c9ea15a623226b890f63bc65876a6f5203f8
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/638331Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
      Commit-Queue: Michael Hablich <hablich@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47648}
      a588411e
  6. 25 Aug, 2017 1 commit
    • Jakob Gruber's avatar
      [snapshot] Move builtins to dedicated snapshot area · 49e3bfd5
      Jakob Gruber authored
      As a first step towards lazy builtin deserialization, this CL moves
      builtins to their own dedicated area in the snapshot blob, physically
      located after startup data and before context-specific data.
      
      The startup- and partial serializers now serialize all seen builtins as
      references, i.e. they only encode the relevant builtin id (taking care
      to preserve special behavior around the interpreter trampoline and
      CompileLazy). Builtins are later fully serialized by the
      BuiltinSerializer. The separate blobs are finally glued together by
      CreateSnapshotBlob.
      
      Deserialization takes the same steps: when we see builtin reference
      bytecodes before builtins have been deserialized, we push to a list of
      deferred builtin references. After builtin deserialization, this list is
      iterated and all builtin references are fixed up.
      
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      Reviewed-on: https://chromium-review.googlesource.com/610225Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47596}
      49e3bfd5
  7. 24 Aug, 2017 1 commit
  8. 23 Aug, 2017 1 commit
  9. 30 Mar, 2017 1 commit
  10. 27 Mar, 2017 1 commit
    • Clemens Hammacher's avatar
      [serializer] Fix wasm code serialization · bd8447af
      Clemens Hammacher authored
      The SerializeGeneric method assumes that the object was not serialized
      before. Hence, we should not call it repeatedly for the same builtin.
      This CL now exposes SerializeBuiltin, and calls that directly.
      We also serialize the Illegal builtin for wasm interpreter entries,
      which are never reused across instantiations anyway.
      
      R=ahaas@chromium.org, yangguo@chromium.org
      BUG=v8:5822
      
      Change-Id: Id74b86fe29171908ed35ddbc06c93f0d241e4917
      Reviewed-on: https://chromium-review.googlesource.com/458380Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44155}
      bd8447af
  11. 07 Mar, 2017 1 commit
  12. 18 Jan, 2017 1 commit
    • clemensh's avatar
      [wasm] Skip serialization of breakpoints and certion stubs · 3c897883
      clemensh authored
      Breakpoints are always re-set by the embedder after compilation, so we
      don't want to store the corresponding breakpoint objects.
      Also don't serialize WASM_INTERPRETER_ENTRY stubs as they are replaced
      by ordinary WASM_FUNCTION code at instantiation anyway, and skip
      WASM_TO_JS wrappers which are recompiled on each instantiation.
      Instead, we serialize the Illegal builtin, and also use that one
      instead of the placeholder when compiling the wasm code initially.
      
      R=titzer@chromium.org, yangguo@chromium.org
      BUG=v8:5822
      
      Review-Url: https://codereview.chromium.org/2629853004
      Cr-Commit-Position: refs/heads/master@{#42451}
      3c897883
  13. 22 Oct, 2016 1 commit
  14. 19 Oct, 2016 1 commit
    • titzer's avatar
      [wasm] Use a Managed<WasmModule> to hold metadata about modules. · 418b239f
      titzer authored
      This CL refactors the handling of metadata associated with WebAssembly
      modules to reduce the duplicate marshalling of data from the C++ world
      to the JavaScript world. It does this by wrapping the C++ WasmModule*
      object in a Foreign that is rooted from the on-heap WasmCompiledModule
      (which is itself just a FixedArray). Upon serialization, the C++ object
      is ignored and the original WASM wire bytes are serialized. Upon
      deserialization, the C++ object is reconstituted by reparsing the bytes.
      
      This is motivated by increasing complications in implementing the JS
      API, in particular WebAssembly.Table, which must perform signature
      canonicalization across instances.
      
      Additionally, this CL implements the proper base + offset initialization
      behavior for tables.
      
      R=rossberg@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,yangguo@chromium.org
      BUG=v8:5507, chromium:575167, chromium:657316
      
      Review-Url: https://chromiumcodereview.appspot.com/2424623002
      Cr-Commit-Position: refs/heads/master@{#40434}
      418b239f
  15. 14 Oct, 2016 1 commit
  16. 06 Oct, 2016 1 commit
    • mtrofin's avatar
      [wasm] Support recompilation if deserialization fails. · 917ef616
      mtrofin authored
      One step closer to the informally-agreed upon specification
      that structured cloning will always succeed, meaning, if
      we fail to deserialize (e.g. because version mismatch in
      serialized format and v8 version), we recompile.
      
      As part of this work, the deserializer will need to become
      more resilient to invalid input data, and fail graciously
      rather than CHECK-ing. This CL addresses some of that,
      sufficient to unblock the current serialization tests.
      Subsequent CLs will add more testing and the appropriate
      fixes.
      
      BUG=639090
      
      Review-Url: https://codereview.chromium.org/2395793003
      Cr-Commit-Position: refs/heads/master@{#40058}
      917ef616
  17. 12 Sep, 2016 1 commit
    • mtrofin's avatar
      [wasm] reuse the first compiled module. · b4dc310a
      mtrofin authored
      This change avoids needing to keep around an unused compiled
      module. Instead, the result of compiling the wasm bytes is
      given to the first instance. The module object and that instance object
      point to the same compiled module. Instances are, then, cloned from
      the compiled module the module object points to. When an instance is
      collected, we make sure that the module object still has a clone
      available, and, if the last instance is GC-ed, we also reset the compiled
      module so that it does not reference its heap, so that it (==heap) may
      be collected.
      
      This is achieved by linking the clones in a double-linked list and
      registering a finalizer for each. When we create an instance, we tie it
      in the front of the list, making the module object point to it (O(1)). When
      the finalizer is called, we relink the list over the dying object (O(1)). The
      costliest operation is finalizing the last instance, since we need to visit
      all wasm functions and reset heap references.
      
      BUG=v8:5316
      
      Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af
      Review-Url: https://codereview.chromium.org/2305903002
      Cr-Original-Commit-Position: refs/heads/master@{#39153}
      Cr-Commit-Position: refs/heads/master@{#39361}
      b4dc310a
  18. 05 Sep, 2016 2 commits
    • machenbach's avatar
      Revert of [wasm] reuse the first compiled module (patchset #12 id:220001 of... · 359a00bf
      machenbach authored
      Revert of [wasm] reuse the first compiled module (patchset #12 id:220001 of https://codereview.chromium.org/2305903002/ )
      
      Reason for revert:
      mac gc stress failures:
      https://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/8341
      
      Original issue's description:
      > [wasm] reuse the first compiled module.
      >
      > This change avoids needing to keep around an unused compiled
      > module. Instead, the result of compiling the wasm bytes is
      > given to the first instance. The module object and that instance object
      > point to the same compiled module. Instances are, then, cloned from
      > the compiled module the module object points to. When an instance is
      > collected, we make sure that the module object still has a clone
      > available, and, if the last instance is GC-ed, we also reset the compiled
      > module so that it does not reference its heap, so that it (==heap) may
      > be collected.
      >
      > This is achieved by linking the clones in a double-linked list and
      > registering a finalizer for each. When we create an instance, we tie it
      > in the front of the list, making the module object point to it (O(1)). When
      > the finalizer is called, we relink the list over the dying object (O(1)). The
      > costliest operation is finalizing the last instance, since we need to visit
      > all wasm functions and reset heap references.
      >
      > BUG=v8:5316
      >
      > Committed: https://crrev.com/01f5af515728aebe6c5246f4f7dd6c573e8748af
      > Cr-Commit-Position: refs/heads/master@{#39153}
      
      TBR=bradnelson@chromium.org,verwaest@chromium.org,vogelheim@chromium.org,yangguo@chromium.org,mtrofin@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5316
      
      Review-Url: https://codereview.chromium.org/2306403002
      Cr-Commit-Position: refs/heads/master@{#39154}
      359a00bf
    • mtrofin's avatar
      [wasm] reuse the first compiled module. · 01f5af51
      mtrofin authored
      This change avoids needing to keep around an unused compiled
      module. Instead, the result of compiling the wasm bytes is
      given to the first instance. The module object and that instance object
      point to the same compiled module. Instances are, then, cloned from
      the compiled module the module object points to. When an instance is
      collected, we make sure that the module object still has a clone
      available, and, if the last instance is GC-ed, we also reset the compiled
      module so that it does not reference its heap, so that it (==heap) may
      be collected.
      
      This is achieved by linking the clones in a double-linked list and
      registering a finalizer for each. When we create an instance, we tie it
      in the front of the list, making the module object point to it (O(1)). When
      the finalizer is called, we relink the list over the dying object (O(1)). The
      costliest operation is finalizing the last instance, since we need to visit
      all wasm functions and reset heap references.
      
      BUG=v8:5316
      
      Review-Url: https://codereview.chromium.org/2305903002
      Cr-Commit-Position: refs/heads/master@{#39153}
      01f5af51
  19. 12 Aug, 2016 1 commit
  20. 09 Aug, 2016 1 commit
  21. 10 Jun, 2016 2 commits
  22. 18 May, 2016 1 commit
    • yangguo's avatar
      [serializer] prepare attached references for general use. · 735fa0c4
      yangguo authored
      Currently attached references are only used for global proxy, source
      string and code stubs. Mid-term future we want to use attached
      references for arbitrary objects (in fixed order) provided from outside.
      
      This change renames BackReference to SerializerReference to include both
      back references and attached references.
      
      R=mtrofin@chromium.org, vogelheim@chromium.org
      
      Review-Url: https://codereview.chromium.org/1992723002
      Cr-Commit-Position: refs/heads/master@{#36318}
      735fa0c4
  23. 03 May, 2016 1 commit
  24. 01 Mar, 2016 1 commit