mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1697904 - Migrate JIT threshold prefs to StaticPrefs. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D108105
This commit is contained in:
parent
288af81e5b
commit
2fddbf10e9
@ -840,15 +840,6 @@ static void LoadStartupJSPrefs(XPCJSContext* xpccx) {
|
||||
Preferences::GetBool(JS_OPTIONS_DOT_STR "jit.full_debug_checks");
|
||||
#endif
|
||||
|
||||
int32_t baselineInterpThreshold =
|
||||
Preferences::GetInt(JS_OPTIONS_DOT_STR "blinterp.threshold", -1);
|
||||
int32_t baselineThreshold =
|
||||
Preferences::GetInt(JS_OPTIONS_DOT_STR "baselinejit.threshold", -1);
|
||||
int32_t normalIonThreshold =
|
||||
Preferences::GetInt(JS_OPTIONS_DOT_STR "ion.threshold", -1);
|
||||
int32_t ionFrequentBailoutThreshold = Preferences::GetInt(
|
||||
JS_OPTIONS_DOT_STR "ion.frequent_bailout_threshold", -1);
|
||||
|
||||
bool spectreIndexMasking =
|
||||
Preferences::GetBool(JS_OPTIONS_DOT_STR "spectre.index_masking");
|
||||
bool spectreObjectMitigations =
|
||||
@ -899,14 +890,17 @@ static void LoadStartupJSPrefs(XPCJSContext* xpccx) {
|
||||
|
||||
JS_SetGlobalJitCompilerOption(
|
||||
cx, JSJITCOMPILER_BASELINE_INTERPRETER_WARMUP_TRIGGER,
|
||||
baselineInterpThreshold);
|
||||
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_BASELINE_WARMUP_TRIGGER,
|
||||
baselineThreshold);
|
||||
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_ION_NORMAL_WARMUP_TRIGGER,
|
||||
normalIonThreshold);
|
||||
JS_SetGlobalJitCompilerOption(cx,
|
||||
JSJITCOMPILER_ION_FREQUENT_BAILOUT_THRESHOLD,
|
||||
ionFrequentBailoutThreshold);
|
||||
StaticPrefs::javascript_options_blinterp_threshold_AtStartup());
|
||||
JS_SetGlobalJitCompilerOption(
|
||||
cx, JSJITCOMPILER_BASELINE_WARMUP_TRIGGER,
|
||||
StaticPrefs::javascript_options_baselinejit_threshold_AtStartup());
|
||||
JS_SetGlobalJitCompilerOption(
|
||||
cx, JSJITCOMPILER_ION_NORMAL_WARMUP_TRIGGER,
|
||||
StaticPrefs::javascript_options_ion_threshold_AtStartup());
|
||||
JS_SetGlobalJitCompilerOption(
|
||||
cx, JSJITCOMPILER_ION_FREQUENT_BAILOUT_THRESHOLD,
|
||||
StaticPrefs::
|
||||
javascript_options_ion_frequent_bailout_threshold_AtStartup());
|
||||
|
||||
#ifdef DEBUG
|
||||
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_FULL_DEBUG_CHECKS,
|
||||
|
@ -5336,6 +5336,34 @@
|
||||
value: true
|
||||
mirror: once
|
||||
|
||||
# "Warm-up" thresholds at which we attempt to compile a script/function with
|
||||
# the next JIT tier.
|
||||
#
|
||||
# NOTE: These must match JitOptions defaults.
|
||||
- name: javascript.options.blinterp.threshold
|
||||
type: int32_t
|
||||
value: 10
|
||||
mirror: once
|
||||
|
||||
- name: javascript.options.baselinejit.threshold
|
||||
type: int32_t
|
||||
value: 100
|
||||
mirror: once
|
||||
|
||||
- name: javascript.options.ion.threshold
|
||||
type: int32_t
|
||||
value: 1500
|
||||
mirror: once
|
||||
|
||||
# Heuristic threshold for Warp/Ion to decide that too many bailouts are
|
||||
# happening and an IonScript should be discarded.
|
||||
#
|
||||
# NOTE: This must match JitOptions defaults.
|
||||
- name: javascript.options.ion.frequent_bailout_threshold
|
||||
type: int32_t
|
||||
value: 10
|
||||
mirror: once
|
||||
|
||||
- name: javascript.options.compact_on_user_inactive
|
||||
type: bool
|
||||
value: true
|
||||
|
@ -1090,14 +1090,6 @@ pref("dom.event.contextmenu.enabled", true);
|
||||
pref("dom.event.coalesce_mouse_move", true);
|
||||
|
||||
pref("javascript.enabled", true);
|
||||
// Duplicated in JitOptions - ensure both match.
|
||||
pref("javascript.options.blinterp.threshold", 10);
|
||||
// Duplicated in JitOptions - ensure both match.
|
||||
pref("javascript.options.baselinejit.threshold", 100);
|
||||
// Duplicated in JitOptions - ensure both match.
|
||||
pref("javascript.options.ion.threshold", 1500);
|
||||
// Duplicated in JitOptions - ensure both match.
|
||||
pref("javascript.options.ion.frequent_bailout_threshold", 10);
|
||||
pref("javascript.options.asmjs", true);
|
||||
pref("javascript.options.wasm", true);
|
||||
pref("javascript.options.wasm_trustedprincipals", true);
|
||||
|
Loading…
Reference in New Issue
Block a user