Skip to content

Commit

Permalink
[ BigSur Debug JSC ] Multiple .lockdown tests are constant failures
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=248000
<rdar://problem/102442315>

Reviewed by Yusuke Suzuki.

This patch fixes some timeout failures when the JSC stress tests are run in the lockdown
test mode.

1. Introduce @skipModes which allows tests to be skipped from a test mode.
2. Use @skipModes to skip tests that require the JIT from the lockdown test mode.
   This replaces the old method of checking $vm.useJIT() at runtime, which is less
   efficient.
3. Use @skipModes to skip tests that are too slow from the lockdown test mode when
   run on a debug build.
4. Use @skipModes to skip a few tests from the lockdown test mode because these tests
   are too slow even when run on a Release build with lockdown test mode.

* JSTests/microbenchmarks/array-from-derived-object-func.js:
* JSTests/microbenchmarks/array-from-object-func.js:
* JSTests/microbenchmarks/bit-test-constant.js:
* JSTests/microbenchmarks/bit-test-load.js:
* JSTests/microbenchmarks/bit-test-nonconstant.js:
* JSTests/microbenchmarks/data-view-accesses-2.js:
* JSTests/microbenchmarks/delete-property-allocation-sinking.js:
* JSTests/microbenchmarks/delete-property-inline-cache.js:
* JSTests/microbenchmarks/delete-property-keeps-cacheable-structure.js:
* JSTests/microbenchmarks/elidable-new-object-dag.js:
* JSTests/microbenchmarks/elidable-new-object-then-call.js:
* JSTests/microbenchmarks/elidable-new-object-tree.js:
* JSTests/microbenchmarks/function-to-string.js:
* JSTests/microbenchmarks/get-and-put-by-val-double-index-dont-fall-off-a-cliff.js:
* JSTests/microbenchmarks/get-by-val-polymorphic-ic-1.js:
* JSTests/microbenchmarks/get-by-val-polymorphic-ic-4.js:
* JSTests/microbenchmarks/get-by-val-polymorphic-ic-5.js:
* JSTests/microbenchmarks/get-private-name.js:
* JSTests/microbenchmarks/hoist-get-by-offset-tower-with-inferred-types.js:
* JSTests/microbenchmarks/int52-rand-function.js:
* JSTests/microbenchmarks/memcpy-loop.js:
* JSTests/microbenchmarks/memcpy-typed-loop-large.js:
* JSTests/microbenchmarks/object-is.js:
* JSTests/microbenchmarks/obvious-sink-pathology-taken.js:
* JSTests/microbenchmarks/oob-sane-chain-double.js:
* JSTests/microbenchmarks/polyvariant-delete-property.js:
* JSTests/microbenchmarks/richards-empty-try-catch.js:
* JSTests/microbenchmarks/richards-try-catch.js:
* JSTests/microbenchmarks/sinkable-new-object-dag.js:
* JSTests/microbenchmarks/sinkable-new-object-taken.js:
* JSTests/microbenchmarks/sinkable-new-object-with-builtin-constructor.js:
* JSTests/microbenchmarks/sinkable-new-object.js:
* JSTests/microbenchmarks/string-replace-string.js:
* JSTests/microbenchmarks/to-number-boolean.js:
* JSTests/microbenchmarks/typed-array-get-set-by-val-profiling.js:
* JSTests/stress/allow-math-ic-b3-code-duplication.js:
* JSTests/stress/arith-abs-on-various-types.js:
* JSTests/stress/arith-abs-to-arith-negate-range-optimizaton.js:
* JSTests/stress/arith-acos-on-various-types.js:
* JSTests/stress/arith-acosh-on-various-types.js:
* JSTests/stress/arith-asin-on-various-types.js:
* JSTests/stress/arith-asinh-on-various-types.js:
* JSTests/stress/arith-atan-on-various-types.js:
* JSTests/stress/arith-atanh-on-various-types.js:
* JSTests/stress/arith-cbrt-on-various-types.js:
* JSTests/stress/arith-ceil-on-various-types.js:
* JSTests/stress/arith-clz32-on-various-types.js:
* JSTests/stress/arith-cos-on-various-types.js:
* JSTests/stress/arith-cosh-on-various-types.js:
* JSTests/stress/arith-expm1-on-various-types.js:
* JSTests/stress/arith-floor-on-various-types.js:
* JSTests/stress/arith-fround-on-various-types.js:
* JSTests/stress/arith-log10-on-various-types.js:
* JSTests/stress/arith-log2-on-various-types.js:
* JSTests/stress/arith-negate-on-various-types.js:
* JSTests/stress/arith-round-on-various-types.js:
* JSTests/stress/arith-sin-on-various-types.js:
* JSTests/stress/arith-sinh-on-various-types.js:
* JSTests/stress/arith-sqrt-on-various-types.js:
* JSTests/stress/arith-tan-on-various-types.js:
* JSTests/stress/arith-tanh-on-various-types.js:
* JSTests/stress/arith-trunc-on-various-types.js:
* JSTests/stress/bit-op-with-object-returning-int32.js:
* JSTests/stress/bitwise-not-fixup-rules.js:
* JSTests/stress/call-var-args-phantom-arguments-handler-strict.js:
* JSTests/stress/call-var-args-phantom-arguments-strict.js:
* JSTests/stress/checkpoint-osr-exit-needs-to-reload-baseline-jit-constant-pool-gpr.js:
* JSTests/stress/compare-strict-eq-on-various-types.js:
* JSTests/stress/elide-new-object-dag-then-exit.js:
* JSTests/stress/incorrect-put-could-generate-invalid-ic-but-still-not-causing-bad-behavior-bad-transition-debug.js:
* JSTests/stress/int8-repeat-in-then-out-of-bounds.js:
* JSTests/stress/new-regex-inline.js:
* JSTests/stress/obviously-elidable-new-object-then-exit.js:
* JSTests/stress/private-name-assignment-in-constructor.js:
* JSTests/stress/spread-forward-call-varargs-stack-overflow.js:
* JSTests/stress/tail-call-var-args-phantom-arguments-handler-strict.js:
* JSTests/stress/tail-call-var-args-phantom-arguments-strict.js:
* JSTests/stress/undecided-arrays-should-not-need-original-array-for-length.js:
* JSTests/stress/v8-deltablue-strict.js:
* JSTests/stress/v8-richards-strict.js:
* PerformanceTests/JetStream/cdjs/main.js:
* PerformanceTests/SunSpider/tests/v8-v6/v8-deltablue.js:
* PerformanceTests/SunSpider/tests/v8-v6/v8-richards.js:
* Tools/Scripts/run-jsc-stress-tests:

Canonical link: https://commits.webkit.org/256875@main
  • Loading branch information
Mark Lam committed Nov 19, 2022
1 parent 2d62c34 commit bb2a610
Show file tree
Hide file tree
Showing 84 changed files with 119 additions and 97 deletions.
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/array-from-derived-object-func.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/array-from-object-func.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
Expand Down
3 changes: 1 addition & 2 deletions JSTests/microbenchmarks/bit-test-constant.js
@@ -1,6 +1,5 @@
//@ skip if not $jitTests
if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();
//@ $skipModes << :lockdown

let glob = 0

Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/bit-test-load.js
@@ -1,4 +1,5 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"
let glob = 0
let arr = new Int32Array(8)

Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/bit-test-nonconstant.js
@@ -1,4 +1,5 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
let glob = 0

function doTest(number, bit) {
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/data-view-accesses-2.js
@@ -1,4 +1,5 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"
"use strict";

function assert(b, m = "") {
Expand Down
@@ -1,4 +1,5 @@
//@ skip if $model == "Apple Watch Series 3"
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(condition) {
if (!condition)
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/delete-property-inline-cache.js
@@ -1,4 +1,5 @@
//@ skip if $model =~ /^Apple Watch/
//@ $skipModes << :lockdown if $buildType == "debug"

function C() {
this.x = 4;
Expand Down
@@ -1,4 +1,6 @@
//@ skip if $model =~ /^Apple Watch/
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b) {
if (!b)
throw new Error;
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/elidable-new-object-dag.js
@@ -1,5 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if $architecture == "x86"
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/elidable-new-object-then-call.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
}
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/elidable-new-object-tree.js
@@ -1,5 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if $architecture == "x86"
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/function-to-string.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function f(x, y, z) {
// comment in the body
const w = 42;
Expand Down
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

const numPixels = 24000000;
let source = new Uint8Array(numPixels);
let target = new Uint8Array(numPixels);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/get-by-val-polymorphic-ic-1.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b, m) {
if (!b)
throw new Error(m);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/get-by-val-polymorphic-ic-4.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b, m) {
if (!b)
throw new Error(m);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/get-by-val-polymorphic-ic-5.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b, m) {
if (!b)
throw new Error(m);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/get-private-name.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b, m = "Assertion failed") {
if (!b)
throw new Error(m);
Expand Down
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function foo(o)
{
var result = 0;
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/int52-rand-function.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

let seed = 49734321;

Math.random = (function() {
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/memcpy-loop.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function doTest(arr1) {
let arr2 = []
for (let i=0; i<arr1.length; ++i) {
Expand Down
3 changes: 1 addition & 2 deletions JSTests/microbenchmarks/memcpy-typed-loop-large.js
@@ -1,6 +1,5 @@
//@ skip if not $jitTests
if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();
//@ $skipModes << :lockdown

function doTest(arr1, arr2) {
if (arr1.length != arr2.length)
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/object-is.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function incognito(value) {
var array = [];
array.push(value);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/obvious-sink-pathology-taken.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
}
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/oob-sane-chain-double.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(b) {
if (!b)
throw new Error;
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/polyvariant-delete-property.js
@@ -1,4 +1,5 @@
//@ skip if $model == "Apple Watch Series 3"
//@ $skipModes << :lockdown if $buildType == "debug"

function assert(condition) {
if (!condition)
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/richards-empty-try-catch.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/richards-try-catch.js
@@ -1,4 +1,5 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"
//@ requireOptions("--useDataICInFTL=true", "--useDataICSharing=true")

// Copyright 2006-2008 the V8 project authors. All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions JSTests/microbenchmarks/sinkable-new-object-dag.js
@@ -1,5 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if $architecture == "x86"
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/sinkable-new-object-taken.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
}
Expand Down
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
}
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/sinkable-new-object.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

function sumOfArithSeries(limit) {
return limit * (limit + 1) / 2;
}
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/string-replace-string.js
@@ -1,3 +1,5 @@
//@ $skipModes << :lockdown if $buildType == "debug"

function test(a, b, c)
{
return a.replace(b, c);
Expand Down
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/to-number-boolean.js
@@ -1,4 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $buildType == "debug"

var array = [];
var casted = [];
for (var i = 0; i < 1e3; ++i) {
Expand Down
@@ -1,5 +1,6 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if $architecture == "x86"
//@ $skipModes << :lockdown if $buildType == "debug"

// The type of arrayObject is polymorphic, but the access we do on it are not.
function nonPolymorphicUint8ClampedArraySetter(arrayObject, isTypedArray) {
Expand Down
1 change: 1 addition & 0 deletions JSTests/stress/allow-math-ic-b3-code-duplication.js
@@ -1,4 +1,5 @@
//@ skip if $architecture == "x86"
//@ $skipModes << :lockdown if $buildType == "debug"

function test1() {
var o1;
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-abs-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let validInputTestCases = [
// input as string, expected result as string.
["undefined", "NaN"],
Expand Down
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

// Checked int_min < value < 0
function opaqueCheckedBetweenIntMinAndZeroExclusive(arg) {
if (arg < 0) {
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-acos-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let acosOfHalf = Math.acos(0.5);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-acosh-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let acoshOfFour = Math.acosh(4);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-asin-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let asinOfHalf = Math.asin(0.5);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-asinh-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let asinhOfFour = Math.asinh(4);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-atan-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let atanOfFour = Math.atan(4);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-atanh-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let atanhOfHalf = Math.atanh(0.5);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-cbrt-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let cbrtOfHalf = Math.cbrt(0.5);

let validInputTestCases = [
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-ceil-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let validInputTestCases = [
// input as string, expected result as string.
["undefined", "NaN"],
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-clz32-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let validInputTestCases = [
// input as string, expected result as string.
["undefined", "32"],
Expand Down
4 changes: 1 addition & 3 deletions JSTests/stress/arith-cos-on-various-types.js
@@ -1,11 +1,9 @@
//@ skip if not $jitTests
//@ $skipModes << :lockdown
//@ requireOptions("--forceUnlinkedDFG=0")
//@ defaultNoEagerRun
"use strict";

if (typeof $vm != "undefined" && !$vm.useJIT())
$vm.exit();

let cosOfFour = Math.cos(4);

let validInputTestCases = [
Expand Down

0 comments on commit bb2a610

Please sign in to comment.