4a416dbbe1
This CL adds more stress-tests for both shared array buffers and WebAssembly memories. Because of an existing memory leak that will be fixed in upcoming CLs, some new tests are disabled. R=mstarzinger@chromium.org BUG=v8:9380 Change-Id: I2662e3d0a764a032a0c267b2d99e3ccd1a4951d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697252 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#62770}
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
// Copyright 2019 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --experimental-wasm-threads --expose-gc
|
|
|
|
load("test/mjsunit/worker-ping-test.js");
|
|
|
|
let kDisabledAbort = false; // TODO(9380): enable abort for this test
|
|
|
|
let config = {
|
|
numThings: 4, // size of circular buffer
|
|
numWorkers: 4, // number of workers
|
|
numMessages: 500, // number of messages sent to each worker
|
|
allocInterval: 11, // interval for allocating new things per worker
|
|
traceScript: false, // print the script
|
|
traceAlloc: true, // print each allocation attempt
|
|
traceIteration: 10, // print diagnostics every so many iterations
|
|
abortOnFail: kDisabledAbort, // kill worker if allocation fails
|
|
|
|
AllocThing: function AllocThing(id) {
|
|
let pages = 1, max = 1;
|
|
return new WebAssembly.Memory({initial : pages, maximum : max, shared : true});
|
|
},
|
|
BeforeSend: function BeforeSend(msg) {
|
|
gc();
|
|
},
|
|
BeforeReceive: function BeforeReceive(msg) {
|
|
gc();
|
|
}
|
|
}
|
|
|
|
RunWorkerPingTest(config);
|