From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/gc/marking-thread-count.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'js/src/jit-test/tests/gc/marking-thread-count.js') 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); } -- cgit v1.2.3