1. 23 Feb, 2021 2 commits
    • Clemens Backes's avatar
      [no-wasm] Exclude asm->wasm translation code · ca89bf25
      Clemens Backes authored
      The v8_enable_webassembly=false configuration will not be a able to run
      any wasm code, hence remove the whole asm to wasm translation from the
      binary.
      
      In order to skip specific unit tests in that configuration, we move the
      definition of the v8_enable_webassembly gn argument from BUILD.gn to
      v8.gni, such that it is available in all gn files.
      
      R=ecmziegler@chromium.org, machenbach@chromium.org
      
      Bug: v8:11238
      Change-Id: Id4e290df3e42ffd2f05c377bdd3a368871815daf
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712562
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Reviewed-by: 's avatarEmanuel Ziegler <ecmziegler@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72945}
      ca89bf25
    • Bill Budge's avatar
      Revert "Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""" · 942af6c7
      Bill Budge authored
      This reverts commit 9da4e363.
      
      Reason for revert: Fuzzers revealed that Liftoff doesn't use the CallDescriptor when pushing arguments, breaking linkage.
      
      tbr=ahaas@chromium.org,neis@chromium.org,jgruber@chromium.org
      
      Original change's description:
      > Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size"""
      >
      > This is a reland of 352b9ecb
      >
      > The test/fix CL has been merged in, as the fixes to return slot
      > accounting are needed to fix Arm64 issues turned up by the fuzzers:
      >
      > https://chromium-review.googlesource.com/c/v8/v8/+/2644139
      >
      > Original change's description:
      > > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      > >
      > > This is a reland of 1694925c
      > >
      > > Minor fix to linkage for constexpr.
      > >
      > > TBR=ahaas@chromium.org,neis@chromium.org
      > >
      > > Original change's description:
      > > > Reland "[compiler][wasm] Align Frame slots to value size"
      > > >
      > > > This is a reland of cddaf66c
      > > >
      > > > Original change's description:
      > > > > [compiler][wasm] Align Frame slots to value size
      > > > >
      > > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > > >   allocation. This attempts to use alignment holes for smaller
      > > > >   values.
      > > > > - Reworks Frame to use the new allocator for stack slots.
      > > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > > >   slots and for ARMv7 FP register aliasing.
      > > > > - Fixes the RegisterAllocator to align spill slots.
      > > > > - Fixes InstructionSelector to align spill slots.
      > > > >
      > > > > Bug: v8:9198
      > > > >
      > > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > > >
      > > > Bug: v8:9198
      > > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#72195}
      > >
      > > Bug: v8:9198
      > > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72209}
      >
      > Bug: v8:9198
      > Change-Id: I8258f87463f66417c7028b9a1fed4b9b6d82a3be
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2669892
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72506}
      
      Bug: v8:9198
      Change-Id: I7f344e4d018ce3c02333b0b08efeecdd8cddf082
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2713207Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72937}
      942af6c7
  2. 22 Feb, 2021 1 commit
    • Dan Elphick's avatar
      [build] Improve build dependencies for gn check · 3a997519
      Dan Elphick authored
      Currently if gn check is enabled (with v8/third_party ignored), there
      are many errors due to headers being used without adding the proper
      dependency in BUILD.gn (or because it's being used transitively without
      a public_deps chain).
      
      This makes the number of errors go from 2114 to 195.
      
      Apart from adding dependencies, it also moves _v8_internal_Node_Print
      from objects-printer.cc to node.cc so it can see the Node::Print method
      which wouldn't otherwise be possible without a circular dependency. Also
      removes the previously deleted compiler/graph-builder-tester.h file.
      
      Bug: v8:7330
      Change-Id: Icb34585fbef621588265cf4267cfc88ecbcf0a72
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2702331Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72908}
      3a997519
  3. 11 Feb, 2021 1 commit
  4. 09 Feb, 2021 1 commit
  5. 03 Feb, 2021 2 commits
    • Bill Budge's avatar
      Reland "Reland "Reland "[compiler][wasm] Align Frame slots to value size""" · 9da4e363
      Bill Budge authored
      This is a reland of 352b9ecb
      
      The test/fix CL has been merged in, as the fixes to return slot
      accounting are needed to fix Arm64 issues turned up by the fuzzers:
      
      https://chromium-review.googlesource.com/c/v8/v8/+/2644139
      
      Original change's description:
      > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      >
      > This is a reland of 1694925c
      >
      > Minor fix to linkage for constexpr.
      >
      > TBR=ahaas@chromium.org,neis@chromium.org
      >
      > Original change's description:
      > > Reland "[compiler][wasm] Align Frame slots to value size"
      > >
      > > This is a reland of cddaf66c
      > >
      > > Original change's description:
      > > > [compiler][wasm] Align Frame slots to value size
      > > >
      > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > >   allocation. This attempts to use alignment holes for smaller
      > > >   values.
      > > > - Reworks Frame to use the new allocator for stack slots.
      > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > >   slots and for ARMv7 FP register aliasing.
      > > > - Fixes the RegisterAllocator to align spill slots.
      > > > - Fixes InstructionSelector to align spill slots.
      > > >
      > > > Bug: v8:9198
      > > >
      > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > >
      > > Bug: v8:9198
      > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72195}
      >
      > Bug: v8:9198
      > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72209}
      
      Bug: v8:9198
      Change-Id: I8258f87463f66417c7028b9a1fed4b9b6d82a3be
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2669892Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72506}
      9da4e363
    • Michael Lippautz's avatar
      cppgc: Add testing API structure · e963b636
      Michael Lippautz authored
      Adds testing API that can only be used after enabling it on a heap.
      The call that enables testing is only provided via v8_for_testing or
      cppgc_for_testing build targets which protects against misusing from
      production code.
      
      Change-Id: I24a8f5543a2bb479481384e2c555d231383e5d12
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2667513Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72503}
      e963b636
  6. 30 Jan, 2021 1 commit
    • Bill Budge's avatar
      Revert "Reland "Reland "[compiler][wasm] Align Frame slots to value size""" · 797c1e3b
      Bill Budge authored
      This reverts commit 352b9ecb.
      
      Reason for revert: fuzzers turned up more problems:
      https://bugs.chromium.org/p/chromium/issues/detail?id=1171759
      https://bugs.chromium.org/p/chromium/issues/detail?id=1171846
      
      tbr=ahaas@chromium.org,neis@chromium.org
      
      Original change's description:
      > Reland "Reland "[compiler][wasm] Align Frame slots to value size""
      >
      > This is a reland of 1694925c
      >
      > Minor fix to linkage for constexpr.
      >
      > TBR=ahaas@chromium.org,neis@chromium.org
      >
      > Original change's description:
      > > Reland "[compiler][wasm] Align Frame slots to value size"
      > >
      > > This is a reland of cddaf66c
      > >
      > > Original change's description:
      > > > [compiler][wasm] Align Frame slots to value size
      > > >
      > > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > > >   allocation. This attempts to use alignment holes for smaller
      > > >   values.
      > > > - Reworks Frame to use the new allocator for stack slots.
      > > > - Reworks LinkageAllocator to use the new allocator for stack
      > > >   slots and for ARMv7 FP register aliasing.
      > > > - Fixes the RegisterAllocator to align spill slots.
      > > > - Fixes InstructionSelector to align spill slots.
      > > >
      > > > Bug: v8:9198
      > > >
      > > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#71644}
      > >
      > > Bug: v8:9198
      > > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#72195}
      >
      > Bug: v8:9198
      > Change-Id: I91e02b823af8ec925dacf075388fb22e3eeb3384
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640890
      > Reviewed-by: Bill Budge <bbudge@chromium.org>
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72209}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9198
      Change-Id: Ifee566e3e82f2e774525996b038ce135190d0be1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2660378
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72447}
      797c1e3b
  7. 28 Jan, 2021 1 commit
  8. 22 Jan, 2021 2 commits
    • Michael Lippautz's avatar
      cppgc: Introduce ObjectSizeTrait · 6d11bcda
      Michael Lippautz authored
      Users of padded objects must know the actual object size for
      implementing custom finalizers.
      
      Bug: chromium:1056170
      Change-Id: I0ddf9066cfece0a8d18a9e6fd985d09449eea92a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2644941
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72269}
      6d11bcda
    • Omer Katz's avatar
      cppgc: Add UMA support · adda4c5f
      Omer Katz authored
      This CL introduces cppgc::HistogramRecorder api which is similar to the
      v8::metrics::Recorder api and is used by cppgc to report histogram
      samples to embedders. Embedders should implement the api if they want to
      collect histograms and provide an instance of it on heap creation.
      
      CppHeap uses an adaptor class that implements the HistogramRecorder api
      and is used to forward the relevant info to the relevant
      v8::metrics::Recorder.
      
      The api used 3 data structures: 2 for incremental steps that need to be
      reported as they come (marking and sweeping) and 1 for the end of a GC
      cycle that aggregates statistics over the entire cycle.
      The data structure only provide the "raw" samples (e.g. atomic mark
      time, incremental mark time, etc...). The embedder is expected to
      compute aggregate histogram on its own (e.g. overall marking time).
      
      Bug: chromium:1056170
      Change-Id: If63ef50a29a21594f654edb83084598980d221ce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642258
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72256}
      adda4c5f
  9. 21 Jan, 2021 3 commits
  10. 20 Jan, 2021 2 commits
    • Clemens Backes's avatar
      Revert "Reland "[compiler][wasm] Align Frame slots to value size"" · f1730ded
      Clemens Backes authored
      This reverts commit 1694925c.
      
      Reason for revert: Link error in CFI release build: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20CFI%20-%20release%20builder/19756/overview
      
      Original change's description:
      > Reland "[compiler][wasm] Align Frame slots to value size"
      >
      > This is a reland of cddaf66c
      >
      > Original change's description:
      > > [compiler][wasm] Align Frame slots to value size
      > >
      > > - Adds an AlignedSlotAllocator class and tests, to unify slot
      > >   allocation. This attempts to use alignment holes for smaller
      > >   values.
      > > - Reworks Frame to use the new allocator for stack slots.
      > > - Reworks LinkageAllocator to use the new allocator for stack
      > >   slots and for ARMv7 FP register aliasing.
      > > - Fixes the RegisterAllocator to align spill slots.
      > > - Fixes InstructionSelector to align spill slots.
      > >
      > > Bug: v8:9198
      > >
      > > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#71644}
      >
      > Bug: v8:9198
      > Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#72195}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      Change-Id: Ic94763925195c3a3552930e61a0eb0b7f0c0c756
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9198
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640474Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72197}
      f1730ded
    • Bill Budge's avatar
      Reland "[compiler][wasm] Align Frame slots to value size" · 1694925c
      Bill Budge authored
      This is a reland of cddaf66c
      
      Original change's description:
      > [compiler][wasm] Align Frame slots to value size
      >
      > - Adds an AlignedSlotAllocator class and tests, to unify slot
      >   allocation. This attempts to use alignment holes for smaller
      >   values.
      > - Reworks Frame to use the new allocator for stack slots.
      > - Reworks LinkageAllocator to use the new allocator for stack
      >   slots and for ARMv7 FP register aliasing.
      > - Fixes the RegisterAllocator to align spill slots.
      > - Fixes InstructionSelector to align spill slots.
      >
      > Bug: v8:9198
      >
      > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71644}
      
      Bug: v8:9198
      Change-Id: Ib91fa6746370c38496706341e12d05c7bf999389
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633390
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72195}
      1694925c
  11. 10 Dec, 2020 1 commit
    • Bill Budge's avatar
      Revert "[compiler][wasm] Align Frame slots to value size" · ba4c08a9
      Bill Budge authored
      This reverts commit cddaf66c.
      
      Reason for revert: Multiple fuzzer failures
      
      TBR=neis@chromium.org,ahaas@chromium.org
      
      Original change's description:
      > [compiler][wasm] Align Frame slots to value size
      >
      > - Adds an AlignedSlotAllocator class and tests, to unify slot
      >   allocation. This attempts to use alignment holes for smaller
      >   values.
      > - Reworks Frame to use the new allocator for stack slots.
      > - Reworks LinkageAllocator to use the new allocator for stack
      >   slots and for ARMv7 FP register aliasing.
      > - Fixes the RegisterAllocator to align spill slots.
      > - Fixes InstructionSelector to align spill slots.
      >
      > Bug: v8:9198
      >
      > Change-Id: Ida148db428be89ef95de748ec5fc0e7b0358f523
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2512840
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#71644}
      
      TBR=bbudge@chromium.org,neis@chromium.org,ahaas@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9198
      Change-Id: Ib26d016df6f30f333d30b5ac14eed9630bba8252
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584200
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71703}
      ba4c08a9
  12. 07 Dec, 2020 1 commit
  13. 27 Nov, 2020 1 commit
  14. 24 Nov, 2020 1 commit
  15. 19 Nov, 2020 1 commit
    • Omer Katz's avatar
      cppgc: Add tracing scopes · 6a1a3a10
      Omer Katz authored
      This CL adds tracing scopes for the various cppgc classes.
      Scopes use TRACE_EVENT_BEGIN and TRACE_EVENT_END macros to report trace
      events. To do so they need to include trace-event.h. For unified heap
      builds, trace-event.h forwards to v8's src/tracing/trace-event.h. For
      other builds, trace-event.h provides a subset of
      src/tracing/trace-event.h that covers just the parts used by cppgc.
      
      This CL covers what we need for traces and blink gc metrics (up to
      renaming events from BlinkGC.* to CppGC.*). UMA and UKM are not yet
      handled.
      
      Bug: chromium:1056170
      Change-Id: Id92e84b27259ff0aadae7692f3d79d30896fb8e7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2540548
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71284}
      6a1a3a10
  16. 17 Nov, 2020 1 commit
  17. 27 Oct, 2020 1 commit
  18. 23 Oct, 2020 2 commits
  19. 22 Oct, 2020 3 commits
  20. 16 Oct, 2020 3 commits
    • Michael Lippautz's avatar
      Reland "cppgc-js: Add snapshot for C++ objects" · 063d56e7
      Michael Lippautz authored
      This reverts commit fba14bde.
      
      Reland fixes:
      - const vector<const string> -> const vector<string>
      
      Original message:
      The following implements a snapshotting algorithm for C++ objects that
      also filters strongly-connected components (SCCs) of only "hidden"
      objects that are not (transitively) referencing any non-hidden
      objects.
      
      C++ objects come in two versions.
      a. Named objects that have been assigned a name through NameProvider.
      b. Unnamed objects, that are potentially hidden if the build
         configuration requires Oilpan to hide such names. Hidden objects have
         their name set to NameProvider::kHiddenName.
      
      The main challenge for the algorithm is to avoid blowing up the final
      object graph with hidden nodes that do not carry information. For that
      reason, the algorithm filters SCCs of only hidden objects, e.g.:
        ...  -> (object) -> (object) -> (hidden) -> (hidden)
      In this case the (hidden) objects are filtered from the graph. The
      trickiest part is maintaining visibility state for objects referencing
      other objects that are currently being processed.
      
      Main algorithm idea (two passes):
      1. First pass marks all non-hidden objects and those that transitively
         reach non-hidden objects as visible. Details:
         - Iterate over all objects.
         - If object is non-hidden mark it as visible and also mark parent
           as visible if needed.
         - If object is hidden, traverse children as DFS to find non-hidden
           objects. Post-order process the objects and mark those objects as
           visible that have child nodes that are visible themselves.
         - Maintain an epoch counter (StateStorage::state_count_) to allow
           deferring the visibility decision to other objects in the same
           SCC. This is similar to the "lowlink" value in Tarjan's algorithm
           for SCC.
         - After the first pass it is guaranteed that all deferred
           visibility decisions can be resolved.
      2. Second pass adds nodes and edges for all visible objects.
         - Upon first checking the visibility state of an object, all deferred
           visibility states are resolved.
      
      For practical reasons, the recursion is transformed into an iteration.
      We do not use plain Tarjan's algorithm to avoid another pass over
      all nodes to create SCCs.
      
      Follow ups:
      1. Adding wrapper nodes for cpp objects that are wrappables for V8
         wrappers.
      2. Adding detachedness information.
      
      Bug: chromium:1056170
      Change-Id: Ib47df5c912c57d644d052f209276e9d926cece0f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2480362
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70577}
      063d56e7
    • Maya Lekova's avatar
      Revert "cppgc-js: Add snapshot for C++ objects" · fba14bde
      Maya Lekova authored
      This reverts commit 02849fd9.
      
      Reason for revert: Breaks Win64 MSVC bot and closes the tree - https://ci.chromium.org/p/v8/builders/ci/V8%20Win64%20-%20msvc/15416
      
      Original change's description:
      > cppgc-js: Add snapshot for C++ objects
      >
      > The following implements a snapshotting algorithm for C++ objects that
      > also filters strongly-connected components (SCCs) of only "hidden"
      > objects that are not (transitively) referencing any non-hidden
      > objects.
      >
      > C++ objects come in two versions.
      > a. Named objects that have been assigned a name through NameProvider.
      > b. Unnamed objects, that are potentially hidden if the build
      >    configuration requires Oilpan to hide such names. Hidden objects have
      >    their name set to NameProvider::kHiddenName.
      >
      > The main challenge for the algorithm is to avoid blowing up the final
      > object graph with hidden nodes that do not carry information. For that
      > reason, the algorithm filters SCCs of only hidden objects, e.g.:
      >   ...  -> (object) -> (object) -> (hidden) -> (hidden)
      > In this case the (hidden) objects are filtered from the graph. The
      > trickiest part is maintaining visibility state for objects referencing
      > other objects that are currently being processed.
      >
      > Main algorithm idea (two passes):
      > 1. First pass marks all non-hidden objects and those that transitively
      >    reach non-hidden objects as visible. Details:
      >    - Iterate over all objects.
      >    - If object is non-hidden mark it as visible and also mark parent
      >      as visible if needed.
      >    - If object is hidden, traverse children as DFS to find non-hidden
      >      objects. Post-order process the objects and mark those objects as
      >      visible that have child nodes that are visible themselves.
      >    - Maintain an epoch counter (StateStorage::state_count_) to allow
      >      deferring the visibility decision to other objects in the same
      >      SCC. This is similar to the "lowlink" value in Tarjan's algorithm
      >      for SCC.
      >    - After the first pass it is guaranteed that all deferred
      >      visibility decisions can be resolved.
      > 2. Second pass adds nodes and edges for all visible objects.
      >    - Upon first checking the visibility state of an object, all deferred
      >      visibility states are resolved.
      >
      > For practical reasons, the recursion is transformed into an iteration.
      > We do not use plain Tarjan's algorithm to avoid another pass over
      > all nodes to create SCCs.
      >
      > Follow ups:
      > 1. Adding wrapper nodes for cpp objects that are wrappables for V8
      >    wrappers.
      > 2. Adding detachedness information.
      >
      > Change-Id: I6e127d2c6d65e77defe08e39295a2594f463b962
      > Bug: chromium:1056170
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2467854
      > Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Omer Katz <omerkatz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#70567}
      
      TBR=ulan@chromium.org,mlippautz@chromium.org,bikineev@chromium.org,omerkatz@chromium.org
      
      Change-Id: I64a2cf2259bdaed81f6e0f92bdcc7a1f0df4d197
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2479471Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70571}
      fba14bde
    • Michael Lippautz's avatar
      cppgc-js: Add snapshot for C++ objects · 02849fd9
      Michael Lippautz authored
      The following implements a snapshotting algorithm for C++ objects that
      also filters strongly-connected components (SCCs) of only "hidden"
      objects that are not (transitively) referencing any non-hidden
      objects.
      
      C++ objects come in two versions.
      a. Named objects that have been assigned a name through NameProvider.
      b. Unnamed objects, that are potentially hidden if the build
         configuration requires Oilpan to hide such names. Hidden objects have
         their name set to NameProvider::kHiddenName.
      
      The main challenge for the algorithm is to avoid blowing up the final
      object graph with hidden nodes that do not carry information. For that
      reason, the algorithm filters SCCs of only hidden objects, e.g.:
        ...  -> (object) -> (object) -> (hidden) -> (hidden)
      In this case the (hidden) objects are filtered from the graph. The
      trickiest part is maintaining visibility state for objects referencing
      other objects that are currently being processed.
      
      Main algorithm idea (two passes):
      1. First pass marks all non-hidden objects and those that transitively
         reach non-hidden objects as visible. Details:
         - Iterate over all objects.
         - If object is non-hidden mark it as visible and also mark parent
           as visible if needed.
         - If object is hidden, traverse children as DFS to find non-hidden
           objects. Post-order process the objects and mark those objects as
           visible that have child nodes that are visible themselves.
         - Maintain an epoch counter (StateStorage::state_count_) to allow
           deferring the visibility decision to other objects in the same
           SCC. This is similar to the "lowlink" value in Tarjan's algorithm
           for SCC.
         - After the first pass it is guaranteed that all deferred
           visibility decisions can be resolved.
      2. Second pass adds nodes and edges for all visible objects.
         - Upon first checking the visibility state of an object, all deferred
           visibility states are resolved.
      
      For practical reasons, the recursion is transformed into an iteration.
      We do not use plain Tarjan's algorithm to avoid another pass over
      all nodes to create SCCs.
      
      Follow ups:
      1. Adding wrapper nodes for cpp objects that are wrappables for V8
         wrappers.
      2. Adding detachedness information.
      
      Change-Id: I6e127d2c6d65e77defe08e39295a2594f463b962
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2467854
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70567}
      02849fd9
  21. 15 Oct, 2020 1 commit
  22. 09 Oct, 2020 1 commit
    • Michael Lippautz's avatar
      Migrate CrossThreadPersistent · 4569ffae
      Michael Lippautz authored
      Adds a cross-thread reference for strongly and weakly retaining
      objects on a thread other than the thread that owns the object.
      
      The intended use of the reference is by setting it up on the
      originating thread, holding the object alive from another thread, and
      ultimately accessing the object again on the originating thread.
      
      The reference has known caveats:
      - It's unsafe to use when the heap may terminate;
      - It's unsafe to transitively reach through the graph because of
        compaction;
      
      Change-Id: I84fbdde69a099eb54af5b93c34e2169915b17e64
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436449
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
      Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70428}
      4569ffae
  23. 08 Oct, 2020 1 commit
  24. 28 Sep, 2020 1 commit
  25. 24 Sep, 2020 1 commit
    • Clemens Backes's avatar
      [wasm][memory64] Start implementing the memory64 proposal · 18da0875
      Clemens Backes authored
      This is a first small step for implementing the memory64 proposal:
      1. Add a feature flag.
      2. Add the 0x04 and 0x05 limits flag for memory64.
      3. Read memory limits as LEB-encoded u64 (instead of u32) if a memory64
         limit flag was read.
      4. Unify {MaximumFlag} and {MemoryFlag}, which was used inconsistently
         before.
      5. Add test for memory limits encoded with >5 bytes.
      6. Move some macros from module-decoder-unittest.cc to wasm-macro-gen.h.
      
      Note that still the same limits for the maximum number of pages applies
      as before, i.e. you cannot specify a memory >4GB yet. But you can encode
      that small number in >5 bytes.
      
      R=manoskouk@chromium.org
      
      Bug: v8:10949
      Change-Id: I90a4f08426ae714a67440281785eb00cfc24a349
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2423712
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70110}
      18da0875
  26. 11 Sep, 2020 1 commit
  27. 10 Sep, 2020 3 commits
    • Omer Katz's avatar
      Reland "Reland "cppgc, heap: Don't eagerly allocate worklist segments"" · 5b9889d9
      Omer Katz authored
      This is a reland of f25cb50a
      
      Removed the problematic tests.
      The problem with the test was that we try to pop from an empty segment.
      GCC flags that as accessing beyond the array (i.e. index is uint16_t
      equivalent of -1). Preceding the actual pop is a DCHECK that asserts
      the segment isn't empty. In practice, since we have the DCHECK and
      access to the segment is always via a Local, this shouldn't be a
      problem.
      Unfortunately, GCC flags the access regardless. The DCHECK goes through
      a function pointer so GCC cannot determine that in our unittest the
      DCHECK would crash if index is 0 and the access would not happen (The
      indirection was added to allow for test DCHECK handlers that don't
      crash, so we can't mark the function pointer as noreturn).
      
      Drive-by: Segment::Pop and Segment::Push rely on the their Local
      counterparts checking of emptiness/fullness, so we should always
      access segments via Locals. Making the Segment ctor private.
      
      Original change's description:
      > Reland "cppgc, heap: Don't eagerly allocate worklist segments"
      >
      > This is a reland of c99147c6
      >
      > Original change's description:
      > > cppgc, heap: Don't eagerly allocate worklist segments
      > >
      > > Bug: chromium:1056170
      > > Change-Id: I75a6b5f52bfe8dd71abc086e5d1e060759ad7fc0
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391254
      > > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#69778}
      >
      > Bug: chromium:1056170
      > Change-Id: I4633da065976a6b2710d2f23b946fd2af0e65c83
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401425
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69806}
      
      Bug: chromium:1056170
      Change-Id: I7a122d1a2d20cd4e7c824d249975b4d3df30e03e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403251Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69829}
      5b9889d9
    • Maya Lekova's avatar
      Revert "Reland "cppgc, heap: Don't eagerly allocate worklist segments"" · 68b788ca
      Maya Lekova authored
      This reverts commit f25cb50a.
      
      Reason for revert: Fails compilation on gcc https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20gcc%20-%20debug/9026?
      
      Original change's description:
      > Reland "cppgc, heap: Don't eagerly allocate worklist segments"
      > 
      > This is a reland of c99147c6
      > 
      > Original change's description:
      > > cppgc, heap: Don't eagerly allocate worklist segments
      > >
      > > Bug: chromium:1056170
      > > Change-Id: I75a6b5f52bfe8dd71abc086e5d1e060759ad7fc0
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391254
      > > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#69778}
      > 
      > Bug: chromium:1056170
      > Change-Id: I4633da065976a6b2710d2f23b946fd2af0e65c83
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401425
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69806}
      
      TBR=ulan@chromium.org,mlippautz@chromium.org,omerkatz@chromium.org
      
      Change-Id: I004173e2a82518a88e68eae3a6f7e96656c0ad7e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1056170
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403249Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69809}
      68b788ca
    • Omer Katz's avatar
      Reland "cppgc, heap: Don't eagerly allocate worklist segments" · f25cb50a
      Omer Katz authored
      This is a reland of c99147c6
      
      Original change's description:
      > cppgc, heap: Don't eagerly allocate worklist segments
      >
      > Bug: chromium:1056170
      > Change-Id: I75a6b5f52bfe8dd71abc086e5d1e060759ad7fc0
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391254
      > Commit-Queue: Omer Katz <omerkatz@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69778}
      
      Bug: chromium:1056170
      Change-Id: I4633da065976a6b2710d2f23b946fd2af0e65c83
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2401425Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Omer Katz <omerkatz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69806}
      f25cb50a