Commit 95d4a55e authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[nojit] Auto-skip --opt tests in jitless mode

This piggy-backs off similar support for lite mode, which silently skips
tests that require optimization in lite (and now jitless) modes.

Bug: v8:7777,v8:8778, v8:8885
Change-Id: I666d92685ca71682224028743f02d0cce3723135
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1503758
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60057}
parent 392316dd
......@@ -1762,6 +1762,14 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
String::NewFromUtf8(isolate, "waitUntilDone", NewStringType::kNormal)
.ToLocalChecked(),
FunctionTemplate::New(isolate, WaitUntilDone));
// Reliable access to quit functionality. The "quit" method function
// installed on the global object can be hidden with the --omit-quit flag
// (e.g. on asan bots).
test_template->Set(
String::NewFromUtf8(isolate, "quit", NewStringType::kNormal)
.ToLocalChecked(),
FunctionTemplate::New(isolate, Quit));
global_template->Set(
String::NewFromUtf8(isolate, "version", NewStringType::kNormal)
.ToLocalChecked(),
......
......@@ -414,7 +414,9 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) {
HandleScope scope(isolate);
DCHECK(args.length() == 1 || args.length() == 2);
int status = 0;
if (FLAG_lite_mode) {
if (FLAG_lite_mode || FLAG_jitless) {
// Both jitless and lite modes cannot optimize. Unit tests should handle
// these the same way. In the future, the two flags may become synonyms.
status |= static_cast<int>(OptimizationStatus::kLiteMode);
}
if (!isolate->use_optimizer()) {
......
......@@ -492,30 +492,6 @@
'test-weak-references/WeakReferenceWriteBarrier': [SKIP],
'test-heap-profiler/WeakReference': [SKIP],
# Skip compiler tests that need optimizer to be enabled.
'test-run-intrinsics/*': [SKIP],
'test-run-jsbranches/*': [SKIP],
'test-run-jscalls/*': [SKIP],
'test-run-jsexceptions/*': [SKIP],
'test-run-jsobjects/*': [SKIP],
'test-run-jsops/*': [SKIP],
'test-run-load-store/*': [SKIP],
'test-run-machops/*': [SKIP],
'test-run-native-calls/*': [SKIP],
'test-run-retpoline/*': [SKIP],
'test-run-stackcheck/*': [SKIP],
'test-run-tail-calls/*': [SKIP],
'test-run-unwinding-info/*': [SKIP],
'test-run-variables/*': [SKIP],
'test-run-bytecode-graph-builder/*': [SKIP],
'test-run-deopt/*': [SKIP],
'test-js-context-specialization/*': [SKIP],
'test-code-assembler/*': [SKIP],
'test-code-stub-assembler/*': [SKIP],
'test-accessor-assembler/*': [SKIP],
'test-torque/*': [SKIP],
'test-code-generator/*': [SKIP],
# Slow tests
'test-heap/IncrementalMarkingStepMakesBigProgressWithLargeObjects': [SKIP],
......@@ -549,10 +525,15 @@
# Tests that generate code at runtime.
'codegen-tester/*': [SKIP],
'test-accessor-assembler/*': [SKIP],
'test-api/RegExpInterruption': [SKIP],
'test-assembler-*': [SKIP],
'test-basic-block-profiler/*': [SKIP],
'test-branch-combine/*': [SKIP],
'test-code-assembler/*': [SKIP],
'test-code-generator/*': [SKIP],
'test-code-stub-assembler/*': [SKIP],
'test-js-context-specialization/*': [SKIP],
'test-multiple-return/*': [SKIP],
'test-regexp/MacroAssemblernativeAtStart': [SKIP],
'test-regexp/MacroAssemblerNativeBackReferenceLATIN1': [SKIP],
......@@ -565,7 +546,24 @@
'test-regexp/MacroAssemblerNativeSimpleUC16': [SKIP],
'test-regexp/MacroAssemblerNativeSuccess': [SKIP],
'test-regexp/MacroAssemblerStackOverflow': [SKIP],
'test-run-bytecode-graph-builder/*': [SKIP],
'test-run-calls-to-external-references/*': [SKIP],
'test-run-deopt/*': [SKIP],
'test-run-intrinsics/*': [SKIP],
'test-run-jsbranches/*': [SKIP],
'test-run-jscalls/*': [SKIP],
'test-run-jsexceptions/*': [SKIP],
'test-run-jsobjects/*': [SKIP],
'test-run-jsops/*': [SKIP],
'test-run-load-store/*': [SKIP],
'test-run-machops/*': [SKIP],
'test-run-native-calls/*': [SKIP],
'test-run-retpoline/*': [SKIP],
'test-run-stackcheck/*': [SKIP],
'test-run-tail-calls/*': [SKIP],
'test-run-unwinding-info/*': [SKIP],
'test-run-variables/*': [SKIP],
'test-torque/*': [SKIP],
# Field representation tracking is disabled in jitless mode.
'test-field-type-tracking/*': [SKIP],
......
......@@ -131,15 +131,6 @@
'wasm-*': [SKIP],
}], # lite_mode or variant == jitless
##############################################################################
['variant == jitless', {
# https://crbug.com/v8/7777
'debug/debug-compile-optimized': [SKIP],
'debug/debug-optimize': [SKIP],
'debug/lazy-deopt-then-flush-bytecode': [SKIP],
'debug/regress/regress-crbug-633999': [SKIP],
}], # variant == jitless
##############################################################################
['variant == jitless and not embedded_builtins', {
'*': [SKIP],
......
......@@ -8,7 +8,7 @@
if (isNeverOptimizeLiteMode()) {
print("Warning: skipping test that requires optimization in Lite mode.");
quit(0);
testRunner.quit(0);
}
%DebugToggleBlockCoverage(true);
......
......@@ -29,7 +29,7 @@
if (isNeverOptimizeLiteMode()) {
print("Warning: skipping test that requires optimization in Lite mode.");
quit(0);
testRunner.quit(0);
}
function f() {
......
......@@ -690,7 +690,7 @@ var prettyPrinted;
// optimization is always disabled, explicitly exit the test with a warning.
if (opt_status & V8OptimizationStatus.kLiteMode) {
print("Warning: Test uses assertOptimized in Lite mode, skipping test.");
quit(0);
testRunner.quit(0);
}
// Tests that use assertOptimized() do not make sense if --no-opt
// option is provided. Such tests must add --opt to flags comment.
......
......@@ -389,150 +389,6 @@
'stack-traces-overflow': [SKIP],
}], # lite_mode
##############################################################################
['variant == jitless', {
# https://crbug.com/v8/7777
'array-literal-transitions': [SKIP],
'array-push5': [SKIP],
'array-shift4': [SKIP],
'array-store-and-grow': [SKIP],
'code-coverage-block-opt': [SKIP],
'compiler/abstract-equal-receiver': [SKIP],
'compiler/abstract-equal-symbol': [SKIP],
'compiler/abstract-equal-undetectable': [SKIP],
'compiler/array-buffer-is-view': [SKIP],
'compiler/array-multiple-receiver-maps': [SKIP],
'compiler/array-push-3': [SKIP],
'compiler/array-slice-clone': [SKIP],
'compiler/constant-fold-cow-array': [SKIP],
'compiler/dataview-deopt': [SKIP],
'compiler/dataview-get': [SKIP],
'compiler/dataview-neutered': [SKIP],
'compiler/dataview-set': [SKIP],
'compiler/deopt-array-builtins': [SKIP],
'compiler/deopt-array-push': [SKIP],
'compiler/deopt-inlined-from-call': [SKIP],
'compiler/deopt-numberoroddball-binop': [SKIP],
'compiler/deopt-string-outofbounds': [SKIP],
'compiler/dont-flush-code-marked-for-opt': [SKIP],
'compiler/increment-typefeedback': [SKIP],
'compiler/inlined-array-pop-opt': [SKIP],
'compiler/inlined-call': [SKIP],
'compiler/integral32-add-sub': [SKIP],
'compiler/manual-concurrent-recompile': [SKIP],
'compiler/math-imul': [SKIP],
'compiler/native-context-specialization-hole-check': [SKIP],
'compiler/number-abs': [SKIP],
'compiler/number-ceil': [SKIP],
'compiler/number-comparison-truncations': [SKIP],
'compiler/number-divide': [SKIP],
'compiler/number-floor': [SKIP],
'compiler/number-max': [SKIP],
'compiler/number-min': [SKIP],
'compiler/number-modulus': [SKIP],
'compiler/number-round': [SKIP],
'compiler/number-toboolean': [SKIP],
'compiler/number-trunc': [SKIP],
'compiler/optimized-float32array-length': [SKIP],
'compiler/optimized-float64array-length': [SKIP],
'compiler/optimized-int32array-length': [SKIP],
'compiler/optimized-uint32array-length': [SKIP],
'compiler/opt-next-call': [SKIP],
'compiler/opt-next-call-turbo': [SKIP],
'compiler/promise-resolve-stable-maps': [SKIP],
'compiler/redundancy-elimination': [SKIP],
'compiler/regress-5320': [SKIP],
'compiler/regress-compare-negate': [SKIP],
'compiler/stress-deopt-count-1': [SKIP],
'compiler/stress-deopt-count-2': [SKIP],
'compiler/string-from-code-point': [SKIP],
'compiler/uint8-clamped-array': [SKIP],
'constant-folding-2': [SKIP],
'default-nospec': [SKIP],
'deopt-minus-zero': [SKIP],
'deopt-recursive-eager-once': [SKIP],
'deopt-recursive-lazy-once': [SKIP],
'deopt-recursive-soft-once': [SKIP],
'deopt-unlinked': [SKIP],
'deopt-with-fp-regs': [SKIP],
'deserialize-optimize-inner': [SKIP],
'div-mul-minus-one': [SKIP],
'elements-transition-hoisting': [SKIP],
'ensure-growing-store-learns': [SKIP],
'es6/array-iterator-turbo': [SKIP],
'es6/block-let-crankshaft': [SKIP],
'es6/block-let-crankshaft-sloppy': [SKIP],
'es6/block-scoping': [SKIP],
'es6/block-scoping-sloppy': [SKIP],
'es6/collections-constructor-custom-iterator': [SKIP],
'es6/collections-constructor-iterator-side-effect': [SKIP],
'es6/collections-constructor-with-modified-array-prototype': [SKIP],
'es6/collections-constructor-with-modified-protoype': [SKIP],
'es6/map-constructor-entry-side-effect': [SKIP],
'es6/map-constructor-entry-side-effect2': [SKIP],
'es6/map-constructor-entry-side-effect3': [SKIP],
'es6/map-constructor-entry-side-effect4': [SKIP],
'field-type-tracking': [SKIP],
'getters-on-elements': [SKIP],
'ignition/throw-if-hole': [SKIP],
'ignition/throw-if-not-hole': [SKIP],
'ignition/throw-super-not-called': [SKIP],
'keyed-load-hole-to-undefined': [SKIP],
'keyed-load-with-string-key': [SKIP],
'keyed-load-with-symbol-key': [SKIP],
'math-deopt': [SKIP],
'math-floor-of-div-minus-zero': [SKIP],
'modules-turbo1': [SKIP],
'never-optimize': [SKIP],
'object-seal': [SKIP],
'optimized-map': [SKIP],
'regress/regress-2132': [SKIP],
'regress/regress-2250': [SKIP],
'regress/regress-2315': [SKIP],
'regress/regress-2339': [SKIP],
'regress/regress-2451': [SKIP],
'regress/regress-252797': [SKIP],
'regress/regress-2618': [SKIP],
'regress/regress-3176': [SKIP],
'regress/regress-3650-3': [SKIP],
'regress/regress-3709': [SKIP],
'regress/regress-385565': [SKIP],
'regress/regress-4380': [SKIP],
'regress/regress-5404': [SKIP],
'regress/regress-5790': [SKIP],
'regress/regress-5802': [SKIP],
'regress/regress-6607-1': [SKIP],
'regress/regress-6607-2': [SKIP],
'regress/regress-6941': [SKIP],
'regress/regress-6948': [SKIP],
'regress/regress-6989': [SKIP],
'regress/regress-6991': [SKIP],
'regress/regress-7014-1': [SKIP],
'regress/regress-7014-2': [SKIP],
'regress/regress-7135': [SKIP],
'regress/regress-7254': [SKIP],
'regress/regress-7510': [SKIP],
'regress/regress-794825': [SKIP],
'regress/regress-8913': [SKIP],
'regress/regress-crbug-554831': [SKIP],
'regress/regress-crbug-587068': [SKIP],
'regress/regress-crbug-594183': [SKIP],
'regress/regress-crbug-882233-2': [SKIP],
'regress/regress-embedded-cons-string': [SKIP],
'regress/regress-map-invalidation-2': [SKIP],
'regress/regress-param-local-type': [SKIP],
'regress/regress-store-uncacheable': [SKIP],
'regress/regress-v8-5697': [SKIP],
'shared-function-tier-up-turbo': [SKIP],
'shift-for-integer-div': [SKIP],
'sin-cos': [SKIP],
'smi-mul': [SKIP],
'smi-mul-const': [SKIP],
'string-deopt': [SKIP],
'strong-rooted-literals': [SKIP],
'unary-minus-deopt': [SKIP],
}], # variant == jitless
##############################################################################
['byteorder == big', {
# Emscripten requires little-endian, skip all tests on big endian platforms.
......
......@@ -31,7 +31,7 @@
// Can't OSR with always-opt or in Lite mode.
if (isNeverOptimizeLiteMode()) {
print("Warning: skipping test that requires optimization in Lite mode.");
quit(0);
testRunner.quit(0);
}
assertFalse(isAlwaysOptimize());
......
......@@ -25,7 +25,7 @@
if (isNeverOptimizeLiteMode()) {
print("Warning: skipping test that requires optimization in Lite mode.");
quit(0);
testRunner.quit(0);
}
(function ArgumentsObjectChange() {
......
......@@ -8,7 +8,7 @@
// If we are always or never optimizing it is useless.
if (isNeverOptimizeLiteMode()) {
print("Warning: skipping test that requires optimization in Lite mode.");
quit(0);
testRunner.quit(0);
}
assertFalse(isAlwaysOptimize());
assertFalse(isNeverOptimize());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment