Commit Graph

6 Commits

Author SHA1 Message Date
Jacob Bramley
36243360a7 Make cctest/test-jump-table-assembler/JumpTablePatchingStress reliable on Arm64.
The test was flaky because it assumed that AllocatedAssemblerBuffer
would eventually return an address within near-call range. Rarely, this
did not happen (within the retry limit), and so the test would crash.

This fix allocates a single, kMaxWasmCodeMemory-sized buffer for the
test, and generates call sequences within that buffer.

BUG=v8:8245

Change-Id: I4b44d897c6cbda15a18ab992fa57805de3b2db29
Reviewed-on: https://chromium-review.googlesource.com/c/1347484
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jacob Bramley <jacob.bramley@arm.com>
Cr-Commit-Position: refs/heads/master@{#57898}
2018-11-28 10:43:31 +00:00
Michael Starzinger
53b0c62436 [test] Make assembler buffers non-executable by default.
R=ulan@chromium.org

Change-Id: Ib2eb33688517324884c4172560387242c71094fb
Reviewed-on: https://chromium-review.googlesource.com/c/1342518
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57627}
2018-11-20 08:49:29 +00:00
Michael Starzinger
287bb6a543 [arm64] Mitigate flake in JumpTablePatchingStress.
R=sigurds@chromium.org
TEST=cctest/test-jump-table-assembler/JumpTablePatchingStress
BUG=v8:8085

Change-Id: Iad786172541a2a72d2b774b60da87f40d70ca71d
Reviewed-on: https://chromium-review.googlesource.com/1188135
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55395}
2018-08-24 11:50:38 +00:00
Michael Starzinger
538bd6c709 [wasm][arm64] Extend jump table stress test to ARM64.
R=clemensh@chromium.org
TEST=test-jump-table-assembler/JumpTablePatchingStress
BUG=v8:8018

Change-Id: I1bb4c52a912a7c7ec7fbaf19c79cb7c7dd00a13e
Reviewed-on: https://chromium-review.googlesource.com/1167283
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55016}
2018-08-09 10:37:58 +00:00
Michael Starzinger
ff0473d6ad [wasm][arm] Support concurrent patching of jump table.
This is the port of concurrent jump table patching support to ARM. It
extends the corresponding stress test and changes the encoding of code
targets in jump table slots to use constant pool entries.

R=clemensh@chromium.org
TEST=cctest/test-jump-table-assembler
BUG=v8:8018

Change-Id: I4b709a7f14dace0f4eb9219f995d42ca607bb25f
Reviewed-on: https://chromium-review.googlesource.com/1164952
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54971}
2018-08-08 12:03:25 +00:00
Michael Starzinger
7579b1e3c8 [wasm] Support concurrent patching of jump table.
This adds initial support for concurrently patching jump table slots. It
is needed once different Isolates share code (for the --wasm-shared-code
feature). We need to ensure that instructions holding the target address
within a jump table slot do not cross cache-line boundaries. To do this,
the jump table has been split into consecutive pages.

Note that this also adds a stress test for multiple threads hammering at
a single slot concurrently. The test is currently limited to the ia32
and the x64 architecture, but will be extended to cover others. The test
reliably triggers tearing of the target address on almost every run of
the test and hence serves to prevent regressions.

R=clemensh@chromium.org
TEST=cctest/test-jump-table-assembler
BUG=v8:8018

Change-Id: Ife56bbb61ffcae5d8906ca7b8c604b195603707c
Reviewed-on: https://chromium-review.googlesource.com/1163664
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54942}
2018-08-07 11:20:09 +00:00