diff options
Diffstat (limited to 'js/src/jit-test/tests/gc/gcparam.js')
-rw-r--r-- | js/src/jit-test/tests/gc/gcparam.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/gc/gcparam.js b/js/src/jit-test/tests/gc/gcparam.js new file mode 100644 index 0000000000..67ec7d20da --- /dev/null +++ b/js/src/jit-test/tests/gc/gcparam.js @@ -0,0 +1,58 @@ +gczeal(0); + +function testGetParam(key) { + gcparam(key); +} + +function testChangeParam(key) { + let prev = gcparam(key); + let value = prev - 1; + try { + gcparam(key, value); + assertEq(gcparam(key), value); + gcparam(key, prev); + assertEq(gcparam(key), prev); + } catch { + assertEq(gcparam(key), prev); + } +} + +function testMBParamValue(key) { + let prev = gcparam(key); + const value = 1024; + try { + gcparam(key, value); + assertEq(gcparam(key), value); + } catch { + assertEq(gcparam(key), prev); + } + gcparam(key, prev); +} + +testGetParam("gcBytes"); +testGetParam("gcNumber"); +testGetParam("unusedChunks"); +testGetParam("totalChunks"); + +testChangeParam("maxBytes"); +testChangeParam("incrementalGCEnabled"); +testChangeParam("perZoneGCEnabled"); +testChangeParam("sliceTimeBudgetMS"); +testChangeParam("markStackLimit"); +testChangeParam("highFrequencyTimeLimit"); +testChangeParam("smallHeapSizeMax"); +testChangeParam("largeHeapSizeMin"); +testChangeParam("highFrequencySmallHeapGrowth"); +testChangeParam("highFrequencyLargeHeapGrowth"); +testChangeParam("lowFrequencyHeapGrowth"); +testChangeParam("allocationThreshold"); +testChangeParam("smallHeapIncrementalLimit"); +testChangeParam("largeHeapIncrementalLimit"); +testChangeParam("minEmptyChunkCount"); +testChangeParam("maxEmptyChunkCount"); +testChangeParam("compactingEnabled"); +testChangeParam("mallocThresholdBase"); +testChangeParam("mallocGrowthFactor"); + +testMBParamValue("smallHeapSizeMax"); +testMBParamValue("largeHeapSizeMin"); |