зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1854072 - Change parallel marking threshold pref to use MB instead of KB r=sfink
While the limit when setting the pref is surprising, I think it makes more sense to change this pref to use MB like most of the other GC prefs after which the problem will not arise. Differential Revision: https://phabricator.services.mozilla.com/D188715
This commit is contained in:
Родитель
d72dd36929
Коммит
dfbe267537
|
@ -2087,8 +2087,8 @@ void nsJSContext::EnsureStatics() {
|
|||
|
||||
Preferences::RegisterCallbackAndCall(
|
||||
SetMemoryPrefChangedCallbackInt,
|
||||
"javascript.options.mem.gc_parallel_marking_threshold_kb",
|
||||
(void*)JSGC_PARALLEL_MARKING_THRESHOLD_KB);
|
||||
"javascript.options.mem.gc_parallel_marking_threshold_mb",
|
||||
(void*)JSGC_PARALLEL_MARKING_THRESHOLD_MB);
|
||||
|
||||
Preferences::RegisterCallbackAndCall(
|
||||
SetMemoryGCSliceTimePrefChangedCallback,
|
||||
|
|
|
@ -477,9 +477,9 @@ typedef enum JSGCParamKey {
|
|||
/**
|
||||
* The heap size above which to use parallel marking.
|
||||
*
|
||||
* Default: ParallelMarkingThresholdKB
|
||||
* Default: ParallelMarkingThresholdMB
|
||||
*/
|
||||
JSGC_PARALLEL_MARKING_THRESHOLD_KB = 50,
|
||||
JSGC_PARALLEL_MARKING_THRESHOLD_MB = 50,
|
||||
} JSGCParamKey;
|
||||
|
||||
/*
|
||||
|
|
|
@ -67,7 +67,7 @@ class TenuredChunk;
|
|||
_("maxEmptyChunkCount", JSGC_MAX_EMPTY_CHUNK_COUNT, true) \
|
||||
_("compactingEnabled", JSGC_COMPACTING_ENABLED, true) \
|
||||
_("parallelMarkingEnabled", JSGC_PARALLEL_MARKING_ENABLED, true) \
|
||||
_("parallelMarkingThresholdKB", JSGC_PARALLEL_MARKING_THRESHOLD_KB, true) \
|
||||
_("parallelMarkingThresholdKB", JSGC_PARALLEL_MARKING_THRESHOLD_MB, true) \
|
||||
_("minLastDitchGCPeriod", JSGC_MIN_LAST_DITCH_GC_PERIOD, true) \
|
||||
_("nurseryFreeThresholdForIdleCollection", \
|
||||
JSGC_NURSERY_FREE_THRESHOLD_FOR_IDLE_COLLECTION, true) \
|
||||
|
|
|
@ -516,10 +516,10 @@
|
|||
TimeDuration::FromSeconds(60)) \
|
||||
\
|
||||
/* \
|
||||
* JSGC_PARALLEL_MARKING_THRESHOLD_KB \
|
||||
* JSGC_PARALLEL_MARKING_THRESHOLD_MB \
|
||||
*/ \
|
||||
_(JSGC_PARALLEL_MARKING_THRESHOLD_KB, size_t, parallelMarkingThresholdBytes, \
|
||||
ConvertKB, NoCheck, 10 * 1024 * 1024)
|
||||
_(JSGC_PARALLEL_MARKING_THRESHOLD_MB, size_t, parallelMarkingThresholdBytes, \
|
||||
ConvertMB, NoCheck, 10 * 1024 * 1024)
|
||||
|
||||
namespace js {
|
||||
|
||||
|
|
|
@ -941,16 +941,16 @@ pref("javascript.options.mem.gc_compacting", true);
|
|||
// This only applies to the main runtime and does not affect workers.
|
||||
pref("javascript.options.mem.gc_parallel_marking", false);
|
||||
|
||||
// JSGC_PARALLEL_MARKING_THRESHOLD_KB
|
||||
// JSGC_PARALLEL_MARKING_THRESHOLD_MB
|
||||
// Minimum heap size at which to use parallel marking, if enabled.
|
||||
#if defined(XP_WIN)
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_kb", 20000);
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 20);
|
||||
#elif defined(XP_MACOSX)
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_kb", 4000);
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 4);
|
||||
#elif defined(ANDROID)
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_kb", 200000);
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 200);
|
||||
#elif defined(XP_UNIX)
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_kb", 200000);
|
||||
pref("javascript.options.mem.gc_parallel_marking_threshold_mb", 200);
|
||||
#endif
|
||||
|
||||
// JSGC_HIGH_FREQUENCY_TIME_LIMIT
|
||||
|
|
Загрузка…
Ссылка в новой задаче