Bug 1833854 - Part 7: Add the FOR_EACH_GC_TUNABLE macro to describe tunable GC parame...
[gecko.git] / js / src / jit-test / tests / gc / gcparam.js
bloba1584fc39b8f522fe4fcd5084ba7cc7ccf5443c0
1 gczeal(0);
3 function testGetParam(key) {
4   gcparam(key);
7 function testChangeParam(key, diff) {
8   if (!diff) {
9     diff = 1;
10   }
11   
12   let prev = gcparam(key);
14   let newValue = prev > 0 ? prev - diff : prev + diff;
15   gcparam(key, newValue);
16   assertEq(gcparam(key), newValue);
18   gcparam(key, prev);
19   assertEq(gcparam(key), prev);
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");
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("maxEmptyChunkCount");
51 testChangeParam("compactingEnabled");
52 testChangeParam("parallelMarkingEnabled");
53 testChangeParam("parallelMarkingThresholdKB");
54 testChangeParam("minLastDitchGCPeriod");
55 testChangeParam("nurseryFreeThresholdForIdleCollection");
56 testChangeParam("nurseryFreeThresholdForIdleCollectionPercent");
57 testChangeParam("nurseryTimeoutForIdleCollectionMS");
58 testChangeParam("pretenureThreshold");
59 testChangeParam("zoneAllocDelayKB");
60 testChangeParam("mallocThresholdBase");
61 testChangeParam("urgentThreshold");
62 testChangeParam("nurseryTimeoutForIdleCollectionMS");
63 testChangeParam("helperThreadRatio");
64 testChangeParam("maxHelperThreads");