From 2423d47f141ba2a2ab9dc5004d096d3d52bb6258 Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Mon, 14 Oct 2024 15:41:35 +0000 Subject: [PATCH] Bug 1913114 - wasm: Rename tiering aggressiveness pref and use it in our tests. r=yury Remove the experimental prefix from our tiering level, and use the max in our tests to ensure we have coverage of tier-ups. Differential Revision: https://phabricator.services.mozilla.com/D225125 --- js/src/jit-test/tests/wasm/bench/directives.txt | 2 +- js/src/jit-test/tests/wasm/directives.txt | 2 +- js/src/jit-test/tests/wasm/gc/speculative-inlining.js | 2 +- js/src/jit-test/tests/wasm/lazy-tiering-codegen.js | 2 +- js/src/jit-test/tests/wasm/regress/bug1913876.js | 2 +- js/src/jit-test/tests/wasm/regress/directives.txt | 2 +- js/src/wasm/WasmHeuristics.h | 2 +- modules/libpref/init/StaticPrefList.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/src/jit-test/tests/wasm/bench/directives.txt b/js/src/jit-test/tests/wasm/bench/directives.txt index 2e4b26d1551f..824e65efaf68 100644 --- a/js/src/jit-test/tests/wasm/bench/directives.txt +++ b/js/src/jit-test/tests/wasm/bench/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/directives.txt b/js/src/jit-test/tests/wasm/directives.txt index 20499e666ef9..dbf1f6ace511 100644 --- a/js/src/jit-test/tests/wasm/directives.txt +++ b/js/src/jit-test/tests/wasm/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); test-also=--setpref=wasm_test_serialization=true; test-also=--wasm-compiler=optimizing --no-avx; skip-variant-if: --wasm-compiler=optimizing --no-avx, !getBuildConfiguration("x86") && !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:wasm.js +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); test-also=--setpref=wasm_test_serialization=true; test-also=--wasm-compiler=optimizing --no-avx; skip-variant-if: --wasm-compiler=optimizing --no-avx, !getBuildConfiguration("x86") && !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:wasm.js diff --git a/js/src/jit-test/tests/wasm/gc/speculative-inlining.js b/js/src/jit-test/tests/wasm/gc/speculative-inlining.js index 6a90bb08cce7..75a4c556609b 100644 --- a/js/src/jit-test/tests/wasm/gc/speculative-inlining.js +++ b/js/src/jit-test/tests/wasm/gc/speculative-inlining.js @@ -1,4 +1,4 @@ -// |jit-test| skip-if: !wasmGcEnabled() || !wasmExperimentalCompilePipelineEnabled(); test-also=-P wasm_lazy_tiering; +// |jit-test| skip-if: !wasmGcEnabled() || !wasmExperimentalCompilePipelineEnabled(); test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; // Needs to be at least 13500 in order for test functions to tier up. // See Instance::computeInitialHotnessCounter. diff --git a/js/src/jit-test/tests/wasm/lazy-tiering-codegen.js b/js/src/jit-test/tests/wasm/lazy-tiering-codegen.js index cc5457132c62..280eb8879d11 100644 --- a/js/src/jit-test/tests/wasm/lazy-tiering-codegen.js +++ b/js/src/jit-test/tests/wasm/lazy-tiering-codegen.js @@ -1,4 +1,4 @@ -// |jit-test| skip-if: !wasmExperimentalCompilePipelineEnabled() || !getBuildConfiguration("x64") || !hasDisassembler() || getBuildConfiguration("simulator"); test-also=-P wasm_lazy_tiering; include:codegen-x64-test.js +// |jit-test| skip-if: !wasmExperimentalCompilePipelineEnabled() || !getBuildConfiguration("x64") || !hasDisassembler() || getBuildConfiguration("simulator"); test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; include:codegen-x64-test.js assertEq(hasDisassembler(), true); diff --git a/js/src/jit-test/tests/wasm/regress/bug1913876.js b/js/src/jit-test/tests/wasm/regress/bug1913876.js index f177931460e7..00632e6892a5 100644 --- a/js/src/jit-test/tests/wasm/regress/bug1913876.js +++ b/js/src/jit-test/tests/wasm/regress/bug1913876.js @@ -1,4 +1,4 @@ -// |jit-test| skip-if: !wasmGcEnabled(); test-also=-P wasm_lazy_tiering; +// |jit-test| skip-if: !wasmGcEnabled(); test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; let {a} = wasmEvalText(`(module (type $t (func)) diff --git a/js/src/jit-test/tests/wasm/regress/directives.txt b/js/src/jit-test/tests/wasm/regress/directives.txt index 2e4b26d1551f..824e65efaf68 100644 --- a/js/src/jit-test/tests/wasm/regress/directives.txt +++ b/js/src/jit-test/tests/wasm/regress/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=-P wasm_lazy_tiering -P wasm_lazy_tiering_level=9; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); include:wasm.js diff --git a/js/src/wasm/WasmHeuristics.h b/js/src/wasm/WasmHeuristics.h index 26fde46f5e8f..b03c59f99f3f 100644 --- a/js/src/wasm/WasmHeuristics.h +++ b/js/src/wasm/WasmHeuristics.h @@ -53,7 +53,7 @@ class LazyTieringHeuristics { public: LazyTieringHeuristics() { - level_ = JS::Prefs::wasm_experimental_tiering_level(); + level_ = JS::Prefs::wasm_lazy_tiering_level(); // Clamp to range MIN_LEVEL .. MAX_LEVEL. level_ = std::max(level_, MIN_LEVEL); level_ = std::min(level_, MAX_LEVEL); diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index f940a54a8f9b..8653f0860164 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -8393,7 +8393,7 @@ # Aggressiveness of lazy tiering, allowable: 1 .. 9 # 1 = min (almost never, set tiering threshold to max possible, == 2^31-1) # 9 = max (request tier up at first call, set tiering threshold to zero) -- name: javascript.options.wasm_experimental_tiering_level +- name: javascript.options.wasm_lazy_tiering_level type: uint32_t value: 5 mirror: always