summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/marking-thread-count.js
blob: 3c2f7ed30d1ba721000abc93842ae3331041763d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |jit-test| skip-if: helperThreadCount() === 0

// Allow maximum number of helper threads
gcparam('maxHelperThreads', 8);
gcparam('helperThreadRatio', 100);

check();

for (let i of [0, 1, 4, 8, 4, 0]) {
  gcparam('maxMarkingThreads', i);
  assertEq(gcparam('maxMarkingThreads'), i);
  check();
}

function check() {
  assertEq(gcparam('markingThreadCount') <= gcparam('maxMarkingThreads'), true);
  assertEq(gcparam('markingThreadCount') < gcparam('helperThreadCount'), true);
}