| 1 |
gczeal(0); |
| 2 |
|
| 3 |
function testGetParam(key) { |
| 4 |
gcparam(key); |
| 5 |
} |
| 6 |
|
| 7 |
function testChangeParam(key, diff) { |
| 8 |
if (!diff) { |
| 9 |
diff = 1; |
| 10 |
} |
| 11 |
|
| 12 |
let prev = gcparam(key); |
| 13 |
|
| 14 |
let newValue = prev > 0 ? prev - diff : prev + diff; |
| 15 |
gcparam(key, newValue); |
| 16 |
assertEq(gcparam(key), newValue); |
| 17 |
|
| 18 |
gcparam(key, prev); |
| 19 |
assertEq(gcparam(key), prev); |
| 20 |
} |
| 21 |
|
| 22 |
testGetParam("gcBytes"); |
| 23 |
testGetParam("gcNumber"); |
| 24 |
testGetParam("unusedChunks"); |
| 25 |
testGetParam("totalChunks"); |
| 26 |
testGetParam("nurseryBytes"); |
| 27 |
testGetParam("majorGCNumber"); |
| 28 |
testGetParam("minorGCNumber"); |
| 29 |
testGetParam("chunkBytes"); |
| 30 |
testGetParam("helperThreadCount"); |
| 31 |
|
| 32 |
testChangeParam("maxBytes"); |
| 33 |
testChangeParam("minNurseryBytes", 16 * 1024); |
| 34 |
testChangeParam("maxNurseryBytes", 1024 * 1024); |
| 35 |
testChangeParam("incrementalGCEnabled"); |
| 36 |
testChangeParam("perZoneGCEnabled"); |
| 37 |
testChangeParam("sliceTimeBudgetMS"); |
| 38 |
testChangeParam("highFrequencyTimeLimit"); |
| 39 |
testChangeParam("smallHeapSizeMax"); |
| 40 |
testChangeParam("largeHeapSizeMin"); |
| 41 |
testChangeParam("highFrequencySmallHeapGrowth"); |
| 42 |
testChangeParam("highFrequencyLargeHeapGrowth"); |
| 43 |
testChangeParam("lowFrequencyHeapGrowth"); |
| 44 |
testChangeParam("balancedHeapLimitsEnabled"); |
| 45 |
testChangeParam("heapGrowthFactor"); |
| 46 |
testChangeParam("allocationThreshold"); |
| 47 |
testChangeParam("smallHeapIncrementalLimit"); |
| 48 |
testChangeParam("largeHeapIncrementalLimit"); |
| 49 |
testChangeParam("minEmptyChunkCount"); |
| 50 |
testChangeParam("compactingEnabled"); |
| 51 |
testChangeParam("parallelMarkingEnabled"); |
| 52 |
testChangeParam("parallelMarkingThresholdMB"); |
| 53 |
testChangeParam("minLastDitchGCPeriod"); |
| 54 |
testChangeParam("nurseryEagerCollectionThresholdKB"); |
| 55 |
testChangeParam("nurseryEagerCollectionThresholdPercent"); |
| 56 |
testChangeParam("nurseryEagerCollectionTimeoutMS"); |
| 57 |
testChangeParam("zoneAllocDelayKB"); |
| 58 |
testChangeParam("mallocThresholdBase"); |
| 59 |
testChangeParam("urgentThreshold"); |
| 60 |
testChangeParam("helperThreadRatio"); |
| 61 |
testChangeParam("maxHelperThreads"); |
| 62 |
testChangeParam("semispaceNurseryEnabled"); |
| 63 |
testChangeParam("nurseryMaxTimeGoalMS"); |