aboutsummaryrefslogtreecommitdiff
path: root/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html')
-rw-r--r--files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html323
1 files changed, 0 insertions, 323 deletions
diff --git a/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html b/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html
deleted file mode 100644
index 1bfa969e7c..0000000000
--- a/files/ja/mozilla/projects/spidermonkey/jsapi_reference/js_getgcparameter/index.html
+++ /dev/null
@@ -1,323 +0,0 @@
----
-title: JS_GetGCParameter
-slug: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetGCParameter
-tags:
- - JSAPI Reference
- - SpiderMonkey
-translation_of: Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetGCParameter
----
-<div>{{SpiderMonkeySidebar("JSAPI")}}</div>
-
-<div class="summary">
-<p>ガベージコレクションに関連するパフォーマンスパラメータを調整します。</p>
-</div>
-
-<h2 id="Syntax" name="Syntax">構文</h2>
-
-<pre class="brush: cpp">uint32_t
-JS_GetGCParameter(JSRuntime *rt, JSGCParamKey key);
-
-void
-JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32_t value);
-
-uint32_t
-JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key); // Added in SpiderMonkeySidebar 17
-
-void
-JS_SetGCParameterForThread(JSContext *cx, JSGCParamKey key, uint32_t value); // Added in SpiderMonkeySidebar 17
-</pre>
-
-<table class="fullwidth-table">
- <tbody>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><code>rt</code></td>
- <td>{{jsapixref("JSRuntime", "JSRuntime *")}}</td>
- <td>The runtime to configure.</td>
- </tr>
- <tr>
- <td><code>cx</code></td>
- <td>{{jsapixref("JSRuntime", "JSContext *")}}</td>
- <td>The context to configure. {{ Jsapi-requires-request() }}</td>
- </tr>
- <tr>
- <td><code>key</code></td>
- <td><code>JSGCParamKey</code></td>
- <td>Specifies which garbage collection parameter to get or set.</td>
- </tr>
- <tr>
- <td><code>value</code></td>
- <td><code>uint32_t</code></td>
- <td><em>(<code>JS_SetGCParameter</code> only)</em> The value to assign to the parameter.</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: cpp">typedef enum JSGCParamKey {
- JSGC_MAX_BYTES,
- JSGC_MAX_MALLOC_BYTES,
- JSGC_MAX_NURSERY_BYTES,
- JSGC_BYTES,
- JSGC_NUMBER,
- JSGC_MODE,
- JSGC_UNUSED_CHUNKS,
- JSGC_TOTAL_CHUNKS,
- JSGC_SLICE_TIME_BUDGET,
- JSGC_MARK_STACK_LIMIT,
- JSGC_HIGH_FREQUENCY_TIME_LIMIT,
- JSGC_HIGH_FREQUENCY_LOW_LIMIT,
- JSGC_HIGH_FREQUENCY_HIGH_LIMIT,
- JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX,
- JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN,
- JSGC_LOW_FREQUENCY_HEAP_GROWTH,
- JSGC_DYNAMIC_HEAP_GROWTH,
- JSGC_DYNAMIC_MARK_SLICE,
- JSGC_ALLOCATION_THRESHOLD,
- JSGC_MIN_EMPTY_CHUNK_COUNT,
- JSGC_MAX_EMPTY_CHUNK_COUNT,
- JSGC_COMPACTION_ENABLED,
- JSGC_ALLOCATION_THRESHOLD_FACTOR,
- JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT,
- JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION,
- JSGC_PRETENURE_THRESHOLD,
- JSGC_PRETENURE_GROUP_THRESHOLD,
- JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION_PERCENT,
- JSGC_MIN_NURSERY_BYTES,
- JSGC_MIN_LAST_DITCH_GC_PERIOD,
-} JSGCParamKey;
-</pre>
-
-<table class="fullwidth-table">
- <tbody>
- <tr>
- <th>Value (C++/JS Shell)</th>
- <th>Description</th>
- </tr>
- <tr>
- <td><code>JSGC_MAX_BYTES</code> / <code>"maxBytes"</code></td>
- <td>Maximum nominal heap before last ditch GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_MAX_MALLOC_BYTES</code> / <code>"maxMallocBytes"</code></td>
- <td>Number of JS_malloc bytes before last ditch GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_MAX_NURSERY_BYTES</code> / <code>"maxNurseryBytes"</code></td>
- <td>Maximum size the nursery may grow to, or 0 to disable generational GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_MIN_NURSERY_BYTES</code> / <code>"minNurseryBytes"</code></td>
- <td>Minimum size the nursery may shrink to.</td>
- </tr>
- <tr>
- <td><code>JSGC_BYTES</code> / <code>"gcBytes"</code></td>
- <td>Amount of bytes allocated by the GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_NUMBER</code> / <code>"gcNumber"</code></td>
- <td>Number of times GC has been invoked. Includes both major and minor GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_MODE</code> / <code>"mode"</code></td>
- <td>
- <p>Select GC mode:</p>
-
- <dl>
- <dt><code>JSGC_MODE_GLOBAL</code> (0)</dt>
- <dd>The GC runs all objects are visited in a single<em>slice</em>.</dd>
- <dt><code>JSGC_MODE_ZONE</code> (1)</dt>
- <dd>The GC runs only the objects that belong to some<em>zones</em> are visited in a single<em>slice</em>.</dd>
- <dt><code>JSGC_MODE_INCREMENTAL</code> (2)</dt>
- <dd>The GC runs all objects are visited in multiple<em>slices</em>.</dd>
- <dt><code>JSGC_MODE_ZONE_INCREMENTAL</code> (3)</dt>
- <dd>The GC runs only the objects that belong to some<em>zones</em> are visited in multiple<em>slices</em>.</dd>
- </dl>
-
- <p>This does not affect generational GC, see <code>JSGC_MAX_NURSERY_BYTES</code></p>
- </td>
- </tr>
- <tr>
- <td><code>JSGC_UNUSED_CHUNKS</code> / <code>"unusedChunks"</code></td>
- <td>Number of cached empty GC chunks.</td>
- </tr>
- <tr>
- <td><code>JSGC_TOTAL_CHUNKS</code> / <code>"totalChunks"</code></td>
- <td>Total number of allocated GC chunks.</td>
- </tr>
- <tr>
- <td><code>JSGC_SLICE_TIME_BUDGET</code> / <code>"sliceTimeBudget"</code></td>
- <td>Max milliseconds to spend in an incremental GC slice. 0 for infinite.</td>
- </tr>
- <tr>
- <td><code>JSGC_MARK_STACK_LIMIT</code> / <code>"markStackLimit"</code></td>
- <td>Maximum size the GC mark stack can grow to (units: entries).</td>
- </tr>
- <tr>
- <td><code>JSGC_HIGH_FREQUENCY_TIME_LIMIT</code> / <code>"highFrequencyTimeLimit"</code></td>
- <td>GCs less than this far apart in time will be considered 'high-frequency GCs'.</td>
- </tr>
- <tr>
- <td><code>JSGC_HIGH_FREQUENCY_LOW_LIMIT</code> / <code>"highFrequencyLowLimit"</code></td>
- <td rowspan="4">
- <p>Controls for dynamic heap growth. When the GC is in "high frequency" mode (see above) then, the heap will be allowed to grow between collections according to these four parameters. See ZoneHeapThreshold::computeZoneHeapGrowthFactorForHeapSize in GC.cpp for the details.</p>
-
- <p>The first two parameters are in MB and the remaining two are in percentage of heap size.</p>
- </td>
- </tr>
- <tr>
- <td><code>JSGC_HIGH_FREQUENCY_HIGH_LIMIT</code> / <code>"highFrequencyHighLimit"</code></td>
- </tr>
- <tr>
- <td><code>JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX</code> / <code>"highFrequencyHeapGrowthMax"</code></td>
- </tr>
- <tr>
- <td><code>JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN</code> / <code>"highFrequencyHeapGrowthMin"</code></td>
- </tr>
- <tr>
- <td><code>JSGC_LOW_FREQUENCY_HEAP_GROWTH</code> / <code>"lowFrequencyHeapGrowth"</code></td>
- <td>Heap growth percentage for low frequency GCs.</td>
- </tr>
- <tr>
- <td><code>JSGC_DYNAMIC_HEAP_GROWTH</code> / <code>"dynamicHeapGrowth"</code></td>
- <td>If false, the heap growth percentage is fixed at 300%. If true, it is determined based on whether GCs are high- or low- frequency.</td>
- </tr>
- <tr>
- <td><code>JSGC_DYNAMIC_MARK_SLICE</code> / <code>"dynamicMarkSlice"</code></td>
- <td>If true, high-frequency GCs will use a longer mark slice.</td>
- </tr>
- <tr>
- <td><code>JSGC_ALLOCATION_THRESHOLD</code> / <code>"allocationThreshold"</code></td>
- <td>Lower limit after which we limit the heap growth. The heap will be collected if it is greater than: <code>MAX(allocThreshold, lastSize) * thresholdFactor</code>, This establishes allocThreshold as a baseline or default heap size.</td>
- </tr>
- <tr>
- <td><code>JSGC_ALLOCATION_THRESHOLD_FACTOR</code> / <code>"allocationThresholdFactor"</code></td>
- <td rowspan="2">
- <p>These thresholds (as percentages) are compared with the zone threshold (above) to decide when to begin an incremental collection. <code>JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT</code> is used when a GC is already in progress for other zones and we may wish to avoid interrupting it.</p>
-
- <p>Additionally if a zone expands beyond the threshold without this factor, then it will be collected non-incrementally</p>
- </td>
- </tr>
- <tr>
- <td><code>JSGC_ALLOCATION_THRESHOLD_FACTOR_AVOID_INTERRUPT</code> / <code>"allocationThresholdfactorAvoidInterrupt"</code></td>
- </tr>
- <tr>
- <td><code>JSGC_MIN_EMPTY_CHUNK_COUNT</code> / <code>"minEmptyChunkCount"</code></td>
- <td>We try to keep at least this many unused chunks in the free chunk pool at all times, even after a shrinking GC.</td>
- </tr>
- <tr>
- <td><code>JSGC_MAX_EMPTY_CHUNK_COUNT</code> / <code>"maxEmptyChunkCount"</code></td>
- <td>We never keep more than this many unused chunks in the free chunk pool.</td>
- </tr>
- <tr>
- <td><code>JSGC_COMPACTION_ENABLED</code> / <code>"compactingEnabled"</code></td>
- <td>non-zero to enable compacting, zero to disable.</td>
- </tr>
- <tr>
- <td><code>JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION</code> / <code>"nurseryFreeThresholdForIdleCollection"</code></td>
- <td>Collect the nursery in idle time if it has less than this many bytes of free space.</td>
- </tr>
- <tr>
- <td><code>JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION_PERCENT</code> / <code>"nurseryFreeThresholdForIdleCollectionPercent"</code></td>
- <td>Collect the nursery in idle time if it has less than this percentage of capacity free (value from 0 - 99).</td>
- </tr>
- <tr>
- <td><code>JSGC_PRETENURE_THRESHOLD</code> / <code>"pretenureThreshold"</code></td>
- <td>If this percentage of the nursery is tenured and the nursery is at least 4MB, then process object groups to look for pretenuring candidates.</td>
- </tr>
- <tr>
- <td><code>JSGC_PRETENURE_GROUP_THRESHOLD</code> / <code>"pretenureGroupThreshold"</code></td>
- <td>If more than this number of objects in a given object group are tenured, then pretenruing will be enabled for new objects in this group.</td>
- </tr>
- <tr>
- <td><code>JSGC_MIN_LAST_DITCH_GC_PERIOD</code> / <code>"minLastDitchGCPeriod"</code></td>
- <td>The minimum time to allow between triggering last ditch GCs in seconds.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Description" name="Description">説明</h2>
-
-<p><code>JS_GetGCParameter</code> returns the current parameter of the garbage collection.</p>
-
-<p>If successful, <code>JS_GetGCParameter</code> returns the current parameter.</p>
-
-<p><code>JS_SetGCParameter</code> ajusts the parameter of the garbage collection.</p>
-
-<h2 id="See_Also" name="See_Also">あわせて参照</h2>
-
-<ul>
- <li>{{ LXRSearch("ident", "i", "JS_GetGCParameter") }}</li>
- <li>{{ LXRSearch("ident", "i", "JS_SetGCParameter") }}</li>
- <li>{{bug(474801)}}
- <ul>
- <li><code>JSGC_BYTES</code></li>
- <li><code>JSGC_NUMBER</code></li>
- </ul>
- </li>
- <li>{{bug(474497)}}
- <ul>
- <li><code>JSGC_MAX_CODE_CACHE_BYTES</code></li>
- <li>This option no-longer exists</li>
- <li><code>JS_GetGCParameterForThread</code></li>
- <li><code>JS_SetGCParameterForThread</code></li>
- </ul>
- </li>
- <li>{{bug(624229)}}
- <ul>
- <li><code>JSGC_MODE</code></li>
- </ul>
- </li>
- <li>{{bug(631733)}}
- <ul>
- <li><code>JSGC_UNUSED_CHUNKS</code></li>
- </ul>
- </li>
- <li>{{bug(674480)}}
- <ul>
- <li><code>JSGC_TOTAL_CHUNKS</code></li>
- </ul>
- </li>
- <li>{{bug(641025)}}
- <ul>
- <li><code>JSGC_SLICE_TIME_BUDGET</code></li>
- </ul>
- </li>
- <li>{{bug(673551)}}
- <ul>
- <li><code>JSGC_MARK_STACK_LIMIT</code></li>
- </ul>
- </li>
- <li>{{bug(765435)}}
- <ul>
- <li><code>JSGC_HIGH_FREQUENCY_TIME_LIMIT</code></li>
- <li><code>JSGC_HIGH_FREQUENCY_LOW_LIMIT</code></li>
- <li><code>JSGC_HIGH_FREQUENCY_HIGH_LIMIT</code></li>
- <li><code>JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX</code></li>
- <li><code>JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN</code></li>
- <li><code>JSGC_LOW_FREQUENCY_HEAP_GROWTH</code></li>
- <li><code>JSGC_DYNAMIC_HEAP_GROWTH</code></li>
- <li><code>JSGC_DYNAMIC_MARK_SLICE</code></li>
- </ul>
- </li>
- <li>{{bug(800063)}}
- <ul>
- <li><code>JSGC_ALLOCATION_THRESHOLD</code></li>
- </ul>
- </li>
- <li>{{bug(871005)}}
- <ul>
- <li><code>JSGC_DECOMMIT_THRESHOLD</code></li>
- <li>This option is no-longer exists</li>
- </ul>
- </li>
- <li>{{bug(1017141)}}
- <ul>
- <li><code>JSGC_MIN_EMPTY_CHUNK_COUNT</code></li>
- <li><code>JSGC_MAX_EMPTY_CHUNK_COUNT</code></li>
- </ul>
- </li>
-</ul>