1. 19 Aug, 2020 1 commit
    • Ng Zhi An's avatar
      [wasm-simd] Fix bounds check for load extends · a85b5a63
      Ng Zhi An authored
      Load extends always load 8 bytes, so the access size does not depend on
      MachineType of the load. The MachineType is used for classifying the
      lane shape of the 8-byte load.
      
      Also add cctest to load splats and load extends to test OOB. (Note that
      load splats access size depends on MachineType).
      
      Add regression test from clusterfuzz, minimized by ahaas@. Remove the
      `--no-wasm-trap-handler` flag since we have a no_wasm_traps variant that
      should test this flag.
      
      Bug: chromium:1116019
      Change-Id: I27ba051d0536ca0f6fd75dd641ca9b78132dafed
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2363291
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69489}
      a85b5a63
  2. 18 Aug, 2020 3 commits
  3. 17 Aug, 2020 4 commits
    • Ng Zhi An's avatar
      [wasm-simd] Support returning Simd128 on caller's stack · 360c9294
      Ng Zhi An authored
      In Liftoff, we were missing kS128 cases to load to/from stack.
      
      For the x64 and ARM64 instruction selector, the calculation of
      reverse_slot is incorrect for 128-bit values:
      
      - reverse_slot += 2 (size of 128-bit values, 2 pointers)
      - this copies from slot -2 into register
      - but the value starts at slot -1, it occupies slots -1 and -2
      - we end up copying slot -2 (most significant half) of the register, and
      also slot -3, which is where rsi was store (Wasm instance addr)
      - the test ends up with a different result every time
      
      The calculation of reverse_slot is changed to follow how ia32 and ARM
      does it, which is to start with
      
      - reverse_slot = 0
      - in the code-generator, add 1 to the slot
      - then after emitting Peek operation, reverse_slot += 2
      
      The fixes for x64 and ARM64 are in both instruction-selector and
      code-generator.
      
      ia32 and ARM didn't support writing kSimd128 values yet, it was only a
      missing check in code-generator, so add that in.
      
      For ARM, the codegen is more involved, vld1 does not support addressing
      with an offset, so we have to do the addition into a scratch register.
      
      Also adding a test for returning multiple v128. V128 is not exposed to
      JavaScript, so we use a Wasm function call, and then an involved chain
      of extract lanes, returning 6 i32 which we verify the values of. It
      extracts the first and last lane of the i32x4 value in order to catch
      bugs where we write or read to a wrong stack slot (off by 1).
      
      The simd-scalar-lowering for kCall was only handling single s128 return,
      we adopt the way i64-lowering handles kCall, so that is can now handle
      any kinds of calls with s128 in the descriptor.
      
      Bug: v8:10794
      Bug: chromium:1115230
      Change-Id: I2ccdd55f6292bc5794be78053b27e14da8cce70e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2355189
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69439}
      360c9294
    • Francis McCabe's avatar
      Revert "Reland^3 "[flags] warn about contradictory flags"" · a5756085
      Francis McCabe authored
      This reverts commit dc18b822.
      
      Reason for revert: still causing failures: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/31566
      
      Original change's description:
      > Reland^3 "[flags] warn about contradictory flags"
      > 
      > This is a reland of 0ba115e6
      > Changes:
      > - Also allow second parameter influenced by --cache to be reassigned.
      > - Fix --stress-opt to only --always-opt in the last iteration as before.
      > 
      > Original change's description:
      > > Reland^2 "[flags] warn about contradictory flags"
      > >
      > > This is a reland of d8f8a7e2
      > > Change compared to last reland:
      > > - Do not check for d8 flag contradictions in the presence of --fuzzing
      > > - Allow identical re-declaration of --cache=*
      > >
      > > Original change's description:
      > > > Reland "[flags] warn about contradictory flags"
      > > >
      > > > This is a reland of b8f91666
      > > > Difference to previous CL: Additional functionality to specify
      > > > incompatible flags based on GN variables and extra-flags, used
      > > > to fix the issues that came up on the waterfall.
      > > >
      > > > This also changes the rules regarding repeated flags: While
      > > > explicitly repeated flags are allowed for boolean values as long
      > > > as they are identical, repeated flags or explicit flags in the
      > > > presence of an active implication are disallowed for non-boolean
      > > > flags. The latter simplifies specifying conflict rules in
      > > > variants.py. Otherwise a rule like
      > > >
      > > > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
      > > >   "--gc-interval=*": ["--gc-interval=*"],
      > > > }
      > > >
      > > > wouldn't work because specifying the same GC interval twice
      > > > wouldn't actually count as a conflict. This was an issue with
      > > > test/mjsunit/wasm/gc-buffer.js, which specifies
      > > > --gc-interval=500 exactly like the extra flag by the stress bot.
      > > >
      > > > Also, this now expands contradictory flags checking to d8 flags
      > > > for consistency.
      > > >
      > > > Original change's description:
      > > > > [flags] warn about contradictory flags
      > > > >
      > > > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      > > > >
      > > > > Bug: v8:10577
      > > > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > > > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > > > Cr-Commit-Position: refs/heads/master@{#68168}
      > > >
      > > > Bug: v8:10577
      > > > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      > > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#68989}
      > >
      > > Bug: v8:10577
      > > Change-Id: I31d2794d4f9ff630f3444210100c64d67d881276
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339464
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#69339}
      > 
      > Bug: v8:10577
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
      > Change-Id: I4a69dc57a102782cb453144323e3752ac8278624
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352770
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69433}
      
      TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org
      
      Change-Id: I4ccdd7b931d0ddccbcec1d6cfae8d4874ee49cfc
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10577
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2360414Reviewed-by: 's avatarFrancis McCabe <fgm@chromium.org>
      Commit-Queue: Francis McCabe <fgm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69438}
      a5756085
    • Tobias Tebbi's avatar
      Reland^3 "[flags] warn about contradictory flags" · dc18b822
      Tobias Tebbi authored
      This is a reland of 0ba115e6
      Changes:
      - Also allow second parameter influenced by --cache to be reassigned.
      - Fix --stress-opt to only --always-opt in the last iteration as before.
      
      Original change's description:
      > Reland^2 "[flags] warn about contradictory flags"
      >
      > This is a reland of d8f8a7e2
      > Change compared to last reland:
      > - Do not check for d8 flag contradictions in the presence of --fuzzing
      > - Allow identical re-declaration of --cache=*
      >
      > Original change's description:
      > > Reland "[flags] warn about contradictory flags"
      > >
      > > This is a reland of b8f91666
      > > Difference to previous CL: Additional functionality to specify
      > > incompatible flags based on GN variables and extra-flags, used
      > > to fix the issues that came up on the waterfall.
      > >
      > > This also changes the rules regarding repeated flags: While
      > > explicitly repeated flags are allowed for boolean values as long
      > > as they are identical, repeated flags or explicit flags in the
      > > presence of an active implication are disallowed for non-boolean
      > > flags. The latter simplifies specifying conflict rules in
      > > variants.py. Otherwise a rule like
      > >
      > > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
      > >   "--gc-interval=*": ["--gc-interval=*"],
      > > }
      > >
      > > wouldn't work because specifying the same GC interval twice
      > > wouldn't actually count as a conflict. This was an issue with
      > > test/mjsunit/wasm/gc-buffer.js, which specifies
      > > --gc-interval=500 exactly like the extra flag by the stress bot.
      > >
      > > Also, this now expands contradictory flags checking to d8 flags
      > > for consistency.
      > >
      > > Original change's description:
      > > > [flags] warn about contradictory flags
      > > >
      > > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      > > >
      > > > Bug: v8:10577
      > > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#68168}
      > >
      > > Bug: v8:10577
      > > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#68989}
      >
      > Bug: v8:10577
      > Change-Id: I31d2794d4f9ff630f3444210100c64d67d881276
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339464
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69339}
      
      Bug: v8:10577
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng
      Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
      Change-Id: I4a69dc57a102782cb453144323e3752ac8278624
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352770
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69433}
      dc18b822
    • Thibaud Michaud's avatar
      [wasm] Disable multi-value · 20728eeb
      Thibaud Michaud authored
      Temporarily disable multi-value until the launch is approved.
      
      R=ahaas@chromium.org
      
      Bug: chromium:1097717
      Change-Id: Ifb2370d87ec5e531257852bc5fc5259386a022d8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2358675Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69419}
      20728eeb
  4. 14 Aug, 2020 1 commit
  5. 13 Aug, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Speed up multiple-code-spaces test · df32131b
      Clemens Backes authored
      TurboFan generates significantly less code than Liftoff for this test,
      and depending on timing it can happen that we need to generate thousands
      of functions, which takes some time and occasionally runs into timeouts.
      Thus disable tier-up for this test, such that we stick with the much
      longer Liftoff code, and reach the four separate code spaces quicker.
      
      R=ahaas@chromium.org
      
      Change-Id: I8e9a0cb466c1bdfef29aceeb5dd31aa96d05b70b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352490Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69369}
      df32131b
  6. 11 Aug, 2020 3 commits
    • Bill Budge's avatar
      Revert "Reland^2 "[flags] warn about contradictory flags"" · 7e932233
      Bill Budge authored
      This reverts commit 0ba115e6.
      
      Reason for revert: Breaks test on TSAN - block-conflicts
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20concurrent%20marking/14230
      
      Original change's description:
      > Reland^2 "[flags] warn about contradictory flags"
      > 
      > This is a reland of d8f8a7e2
      > Change compared to last reland:
      > - Do not check for d8 flag contradictions in the presence of --fuzzing
      > - Allow identical re-declaration of --cache=*
      > 
      > Original change's description:
      > > Reland "[flags] warn about contradictory flags"
      > >
      > > This is a reland of b8f91666
      > > Difference to previous CL: Additional functionality to specify
      > > incompatible flags based on GN variables and extra-flags, used
      > > to fix the issues that came up on the waterfall.
      > >
      > > This also changes the rules regarding repeated flags: While
      > > explicitly repeated flags are allowed for boolean values as long
      > > as they are identical, repeated flags or explicit flags in the
      > > presence of an active implication are disallowed for non-boolean
      > > flags. The latter simplifies specifying conflict rules in
      > > variants.py. Otherwise a rule like
      > >
      > > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
      > >   "--gc-interval=*": ["--gc-interval=*"],
      > > }
      > >
      > > wouldn't work because specifying the same GC interval twice
      > > wouldn't actually count as a conflict. This was an issue with
      > > test/mjsunit/wasm/gc-buffer.js, which specifies
      > > --gc-interval=500 exactly like the extra flag by the stress bot.
      > >
      > > Also, this now expands contradictory flags checking to d8 flags
      > > for consistency.
      > >
      > > Original change's description:
      > > > [flags] warn about contradictory flags
      > > >
      > > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      > > >
      > > > Bug: v8:10577
      > > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#68168}
      > >
      > > Bug: v8:10577
      > > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#68989}
      > 
      > Bug: v8:10577
      > Change-Id: I31d2794d4f9ff630f3444210100c64d67d881276
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339464
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69339}
      
      TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org
      
      Change-Id: I1454a05e357ddd704db7fb79e51be65d45a9a16e
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10577
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2348365Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69341}
      7e932233
    • Tobias Tebbi's avatar
      Reland^2 "[flags] warn about contradictory flags" · 0ba115e6
      Tobias Tebbi authored
      This is a reland of d8f8a7e2
      Change compared to last reland:
      - Do not check for d8 flag contradictions in the presence of --fuzzing
      - Allow identical re-declaration of --cache=*
      
      Original change's description:
      > Reland "[flags] warn about contradictory flags"
      >
      > This is a reland of b8f91666
      > Difference to previous CL: Additional functionality to specify
      > incompatible flags based on GN variables and extra-flags, used
      > to fix the issues that came up on the waterfall.
      >
      > This also changes the rules regarding repeated flags: While
      > explicitly repeated flags are allowed for boolean values as long
      > as they are identical, repeated flags or explicit flags in the
      > presence of an active implication are disallowed for non-boolean
      > flags. The latter simplifies specifying conflict rules in
      > variants.py. Otherwise a rule like
      >
      > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
      >   "--gc-interval=*": ["--gc-interval=*"],
      > }
      >
      > wouldn't work because specifying the same GC interval twice
      > wouldn't actually count as a conflict. This was an issue with
      > test/mjsunit/wasm/gc-buffer.js, which specifies
      > --gc-interval=500 exactly like the extra flag by the stress bot.
      >
      > Also, this now expands contradictory flags checking to d8 flags
      > for consistency.
      >
      > Original change's description:
      > > [flags] warn about contradictory flags
      > >
      > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      > >
      > > Bug: v8:10577
      > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#68168}
      >
      > Bug: v8:10577
      > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68989}
      
      Bug: v8:10577
      Change-Id: I31d2794d4f9ff630f3444210100c64d67d881276
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339464
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69339}
      0ba115e6
    • Clemens Backes's avatar
      Reland "[wasm] Ensure that only TurboFan code is serialized" · cdd984ef
      Clemens Backes authored
      This is a reland of 60ee70bb.
      The wasm c-api flakes were fixed in https://crrev.com/c/2349293.
      
      Original change's description:
      > [wasm] Ensure that only TurboFan code is serialized
      >
      > We have the implicit assumption that Liftoff code will never be
      > serialized, and we start relying on that when implementing new features
      > (debugging, dynamic tiering).
      >
      > This CL makes the serializer fail if the module contains any Liftoff
      > code. Existing tests are changed to ensure that we fully tiered up
      > before serializing a module (similar to the logic in Chromium).
      > The "wasm-clone-module" test needs to serialize the module before
      > enabling the debugger.
      >
      > Note that chrome currently only serializes a module after it fully
      > tiered up, so that should be fine. If other embedders need the ability
      > to serialize a module in an arbitrary state, we will have to fix this
      > later. With this CL we will be on the safe side though and (gracefully)
      > fail serialization instead of accidentally serializing Liftoff code.
      >
      > R=ahaas@chromium.org
      >
      > Bug: v8:10777
      > Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69276}
      
      Bug: v8:10777
      Change-Id: I2a7c1429812ca46d88a2902b8e0a7b7e3d638b56
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349290Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69335}
      cdd984ef
  7. 10 Aug, 2020 3 commits
  8. 07 Aug, 2020 1 commit
    • Leszek Swirski's avatar
      Revert "[wasm] Ensure that only TurboFan code is serialized" · cf325b5a
      Leszek Swirski authored
      This reverts commit 60ee70bb.
      
      Reason for revert: wasm-api-tests/WasmCapiTest.Serialize starts flaking: https://crbug.com/v8/10784
      
      Original change's description:
      > [wasm] Ensure that only TurboFan code is serialized
      > 
      > We have the implicit assumption that Liftoff code will never be
      > serialized, and we start relying on that when implementing new features
      > (debugging, dynamic tiering).
      > 
      > This CL makes the serializer fail if the module contains any Liftoff
      > code. Existing tests are changed to ensure that we fully tiered up
      > before serializing a module (similar to the logic in Chromium).
      > The "wasm-clone-module" test needs to serialize the module before
      > enabling the debugger.
      > 
      > Note that chrome currently only serializes a module after it fully
      > tiered up, so that should be fine. If other embedders need the ability
      > to serialize a module in an arbitrary state, we will have to fix this
      > later. With this CL we will be on the safe side though and (gracefully)
      > fail serialization instead of accidentally serializing Liftoff code.
      > 
      > R=​ahaas@chromium.org
      > 
      > Bug: v8:10777
      > Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Andreas Haas <ahaas@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69276}
      
      TBR=ahaas@chromium.org,clemensb@chromium.org
      
      Change-Id: Ic1349375bd562bb0a2724c39c27ef3247461c97b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10777
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2342845Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69284}
      cf325b5a
  9. 06 Aug, 2020 2 commits
    • Clemens Backes's avatar
      [wasm] Ensure that only TurboFan code is serialized · 60ee70bb
      Clemens Backes authored
      We have the implicit assumption that Liftoff code will never be
      serialized, and we start relying on that when implementing new features
      (debugging, dynamic tiering).
      
      This CL makes the serializer fail if the module contains any Liftoff
      code. Existing tests are changed to ensure that we fully tiered up
      before serializing a module (similar to the logic in Chromium).
      The "wasm-clone-module" test needs to serialize the module before
      enabling the debugger.
      
      Note that chrome currently only serializes a module after it fully
      tiered up, so that should be fine. If other embedders need the ability
      to serialize a module in an arbitrary state, we will have to fix this
      later. With this CL we will be on the safe side though and (gracefully)
      fail serialization instead of accidentally serializing Liftoff code.
      
      R=ahaas@chromium.org
      
      Bug: v8:10777
      Change-Id: I1245e5f7fda3447a544c1e3525e1239cde759174
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336799
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69276}
      60ee70bb
    • Andreas Haas's avatar
      [wasm] Check size of tables dynamically · 47434265
      Andreas Haas authored
      We used to check the size of tables at compile time, and threw a
      CompilationError if a given size exceeded the implementation-defined
      limit. However, the spec defines that an error should only be thrown
      when the implementation-defined limit is reached, which is either at
      instantiation time of during runtime at a table.grow.
      
      With this CL the V8 implementation becomes spec compliant in this
      regard.
      
      R=jkummerow@chromium.org
      
      Bug: v8:10556
      Change-Id: I7d0e688b385a65e4060a569e5ab1dec68947ceea
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2326331
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69267}
      47434265
  10. 04 Aug, 2020 1 commit
  11. 28 Jul, 2020 1 commit
  12. 24 Jul, 2020 1 commit
  13. 22 Jul, 2020 2 commits
    • Maya Lekova's avatar
      Revert "Reland "[flags] warn about contradictory flags"" · a269ce20
      Maya Lekova authored
      This reverts commit d8f8a7e2.
      
      Reason for revert: Breaks code_serializer variant - https://cr-buildbucket.appspot.com/build/8874070652992164976
      
      Original change's description:
      > Reland "[flags] warn about contradictory flags"
      > 
      > This is a reland of b8f91666
      > Difference to previous CL: Additional functionality to specify
      > incompatible flags based on GN variables and extra-flags, used
      > to fix the issues that came up on the waterfall.
      > 
      > This also changes the rules regarding repeated flags: While
      > explicitly repeated flags are allowed for boolean values as long
      > as they are identical, repeated flags or explicit flags in the
      > presence of an active implication are disallowed for non-boolean
      > flags. The latter simplifies specifying conflict rules in
      > variants.py. Otherwise a rule like
      > 
      > INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
      >   "--gc-interval=*": ["--gc-interval=*"],
      > }
      > 
      > wouldn't work because specifying the same GC interval twice
      > wouldn't actually count as a conflict. This was an issue with
      > test/mjsunit/wasm/gc-buffer.js, which specifies
      > --gc-interval=500 exactly like the extra flag by the stress bot.
      > 
      > Also, this now expands contradictory flags checking to d8 flags
      > for consistency.
      > 
      > Original change's description:
      > > [flags] warn about contradictory flags
      > >
      > > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      > >
      > > Bug: v8:10577
      > > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > > Reviewed-by: Georg Neis <neis@chromium.org>
      > > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#68168}
      > 
      > Bug: v8:10577
      > Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68989}
      
      TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org
      
      Change-Id: I7969065b0edbc463a94e530485bc2ab623d77b62
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10577
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2312782Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68992}
      a269ce20
    • Tobias Tebbi's avatar
      Reland "[flags] warn about contradictory flags" · d8f8a7e2
      Tobias Tebbi authored
      This is a reland of b8f91666
      Difference to previous CL: Additional functionality to specify
      incompatible flags based on GN variables and extra-flags, used
      to fix the issues that came up on the waterfall.
      
      This also changes the rules regarding repeated flags: While
      explicitly repeated flags are allowed for boolean values as long
      as they are identical, repeated flags or explicit flags in the
      presence of an active implication are disallowed for non-boolean
      flags. The latter simplifies specifying conflict rules in
      variants.py. Otherwise a rule like
      
      INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
        "--gc-interval=*": ["--gc-interval=*"],
      }
      
      wouldn't work because specifying the same GC interval twice
      wouldn't actually count as a conflict. This was an issue with
      test/mjsunit/wasm/gc-buffer.js, which specifies
      --gc-interval=500 exactly like the extra flag by the stress bot.
      
      Also, this now expands contradictory flags checking to d8 flags
      for consistency.
      
      Original change's description:
      > [flags] warn about contradictory flags
      >
      > Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
      >
      > Bug: v8:10577
      > Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Reviewed-by: Tamer Tas <tmrts@chromium.org>
      > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68168}
      
      Bug: v8:10577
      Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68989}
      d8f8a7e2
  14. 21 Jul, 2020 1 commit
    • Arnaud Robin's avatar
      [wasm] Implement dynamic tiering in wasm · f181dff3
      Arnaud Robin authored
      On desktop systems, we use a very basic tiering strategy: Everything is
      initially compiled with Liftoff, and once that is done, the module can
      start being used. Concurrently to the execution, we re-compile all code
      with TurboFan, and hot-swap each function once TurboFan finishes.
      
      We should start using a more dynamic strategy where each function is
      tiered-up when judged necessary. This change will then tier-up each
      liftoff function once it has been called 5 times.
      
      I then added a counter in the native module, that is updated directly
      from Liftoff code, and a runtime call is then made when the counter
      reaches the goal.
      
      R=clemensb@chromium.org
      CC=​thibaudm@chromium.org
      
      Bug: v8:10728
      Change-Id: I8dc2b02fdff8d97781bb1cf496886594b3d7f644
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306803
      Commit-Queue: Arnaud Robin <arobin@google.com>
      Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68971}
      f181dff3
  15. 20 Jul, 2020 1 commit
  16. 30 Jun, 2020 1 commit
    • Clemens Backes's avatar
      [wasm] Fix flake in cmpxchg stress test · f9d3d78b
      Clemens Backes authored
      It seems that the mix of atomic and non-atomic updates to the same
      memory location is not working correctly. One fix is changing all memory
      updates to be atomic. Another fix is removing the non-atomic access that
      happens while the workers are already running (using atomic accesses).
      This CL implements the latter.
      
      R=ahaas@chromium.org
      
      Bug: v8:10647, v8:10650
      Change-Id: I84b4f3f442b6be3c4ea6e51962a523f443f5e43b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2273133Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68603}
      f9d3d78b
  17. 25 Jun, 2020 1 commit
    • Andreas Haas's avatar
      Reland "[wasm] Re-exported globals preserve their identity" · 1e4282db
      Andreas Haas authored
      This is a reland of f7a1932e
      
      There was a wpt test in Chrome that expected the incorrect behavior.
      I disable the test in https://crrev.com/c/2264418 so that we can land
      the fix here.
      
      Original change's description:
      > [wasm] Re-exported globals preserve their identity
      >
      > V8 fails a recently added spec test that when an imported global get
      > re-exported, it should preserve its identity. This CL fixes the behavior
      > in V8.
      >
      > Drive-by change: fix the object printer of globals: a global which
      > stores a reference type only has a tagged buffer, a global which stores
      > a value type only has an untagged buffer.
      >
      > R=clemensb@chromium.org
      >
      > Bug: v8:10556
      > Change-Id: I949d147fe4395610cfec6cf60082e1faecb23036
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235702
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#68513}
      
      Bug: v8:10556
      Change-Id: I8e1b08fc9f72dde166cba167e6e320e714796769
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264097Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#68552}
      1e4282db
  18. 24 Jun, 2020 2 commits
  19. 23 Jun, 2020 1 commit
  20. 22 Jun, 2020 2 commits
  21. 19 Jun, 2020 2 commits
  22. 18 Jun, 2020 1 commit
  23. 16 Jun, 2020 2 commits
  24. 12 Jun, 2020 1 commit
  25. 10 Jun, 2020 1 commit