diff options
Diffstat (limited to 'js/src/jit-test/tests/gc/marking-thread-count.js')
-rw-r--r-- | js/src/jit-test/tests/gc/marking-thread-count.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/js/src/jit-test/tests/gc/marking-thread-count.js b/js/src/jit-test/tests/gc/marking-thread-count.js index 5b90e14186..3c2f7ed30d 100644 --- a/js/src/jit-test/tests/gc/marking-thread-count.js +++ b/js/src/jit-test/tests/gc/marking-thread-count.js @@ -1,12 +1,18 @@ // |jit-test| skip-if: helperThreadCount() === 0 -let initialGCHelperThreadCount = gcparam('helperThreadCount'); +// Allow maximum number of helper threads +gcparam('maxHelperThreads', 8); +gcparam('helperThreadRatio', 100); + +check(); -let prevHelperThreadCount = helperThreadCount(); for (let i of [0, 1, 4, 8, 4, 0]) { - gcparam('markingThreadCount', i); - assertEq(gcparam('markingThreadCount'), i); - assertEq(gcparam('helperThreadCount'), initialGCHelperThreadCount); - assertEq(true, helperThreadCount() >= Math.max(prevHelperThreadCount, i)); - prevHelperThreadCount = helperThreadCount(); + gcparam('maxMarkingThreads', i); + assertEq(gcparam('maxMarkingThreads'), i); + check(); +} + +function check() { + assertEq(gcparam('markingThreadCount') <= gcparam('maxMarkingThreads'), true); + assertEq(gcparam('markingThreadCount') < gcparam('helperThreadCount'), true); } |