Log Message
Reduce iteration count and change how it invokes GC to reduce execution time of JSTests/stress/delete-property-dfg-inline.js https://bugs.webkit.org/show_bug.cgi?id=210933
Reviewed by Keith Miller.
This test takes 7~ seconds in Release build with default run. And it takes 1 mins in several variants of JSC tests, which is too long.
By analyzing this, we found that this takes very long time,
1. due to so frequent synchronous GC run
2. due to large iteration count while function can get FTL with less counts
While ensuring all functions gets FTL, we reduce iteration count and GC invocations to reduce the execution time, the default run gets 200ms.
* stress/delete-property-dfg-inline.js:
(noInline.blackbox.testSingleStructure):
(noInline.testSingleStructure.testInlineSingleStructure):
(noInline.testInlineSingleStructure.testExit):
(noInline.testExit.testSingleStructureMiss):
(noInline.testSingleStructureMiss.testSingleStructureMissStrict):
(noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable):
(noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty):
(noInline.testSingleStructureEmpty.testPolymorphic):
(noInline.testPolymorphic.testPolyvariant):
(noInline.testPolyvariant.testConstantFolding):
(noInline.testConstantFolding.testObjectSinking):
(noInline.testObjectSinking.testProxy):
(noInline.testProxy.testTypedArray):
(noInline.testTypedArray.testMissMixed):
(noInline.testMissMixed.testMissNonMixed):
(noInline.testMissNonMixed.testByVal.noInline.test):
(noInline.testMissNonMixed.testByVal):
(noInline.assert.assert_throws): Deleted.
Modified Paths
Diff
Modified: trunk/JSTests/ChangeLog (260585 => 260586)
--- trunk/JSTests/ChangeLog 2020-04-23 18:56:51 UTC (rev 260585)
+++ trunk/JSTests/ChangeLog 2020-04-23 19:29:22 UTC (rev 260586)
@@ -1,3 +1,38 @@
+2020-04-23 Yusuke Suzuki <[email protected]>
+
+ Reduce iteration count and change how it invokes GC to reduce execution time of JSTests/stress/delete-property-dfg-inline.js
+ https://bugs.webkit.org/show_bug.cgi?id=210933
+
+ Reviewed by Keith Miller.
+
+ This test takes 7~ seconds in Release build with default run. And it takes 1 mins in several variants of JSC tests, which is too long.
+ By analyzing this, we found that this takes very long time,
+
+ 1. due to so frequent synchronous GC run
+ 2. due to large iteration count while function can get FTL with less counts
+
+ While ensuring all functions gets FTL, we reduce iteration count and GC invocations to reduce the execution time, the default run gets 200ms.
+
+ * stress/delete-property-dfg-inline.js:
+ (noInline.blackbox.testSingleStructure):
+ (noInline.testSingleStructure.testInlineSingleStructure):
+ (noInline.testInlineSingleStructure.testExit):
+ (noInline.testExit.testSingleStructureMiss):
+ (noInline.testSingleStructureMiss.testSingleStructureMissStrict):
+ (noInline.testSingleStructureMissStrict.testSingleStructureMissNonConfigurable):
+ (noInline.testSingleStructureMissNonConfigurable.testSingleStructureEmpty):
+ (noInline.testSingleStructureEmpty.testPolymorphic):
+ (noInline.testPolymorphic.testPolyvariant):
+ (noInline.testPolyvariant.testConstantFolding):
+ (noInline.testConstantFolding.testObjectSinking):
+ (noInline.testObjectSinking.testProxy):
+ (noInline.testProxy.testTypedArray):
+ (noInline.testTypedArray.testMissMixed):
+ (noInline.testMissMixed.testMissNonMixed):
+ (noInline.testMissNonMixed.testByVal.noInline.test):
+ (noInline.testMissNonMixed.testByVal):
+ (noInline.assert.assert_throws): Deleted.
+
2020-04-22 Keith Miller <[email protected]>
Fix OSR exiting/iterator object checks in for-of bytecodes
Modified: trunk/JSTests/stress/delete-property-dfg-inline.js (260585 => 260586)
--- trunk/JSTests/stress/delete-property-dfg-inline.js 2020-04-23 18:56:51 UTC (rev 260585)
+++ trunk/JSTests/stress/delete-property-dfg-inline.js 2020-04-23 19:29:22 UTC (rev 260586)
@@ -1,5 +1,3 @@
-//@ slow!
-
function assert(condition) {
if (!condition)
throw new Error("assertion failed")
@@ -6,6 +4,8 @@
}
noInline(assert)
+let iterationCount = 10000;
+
function assert_throws(f) {
try {
f()
@@ -32,7 +32,7 @@
}
noInline(doAlloc1)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc1()
}
}
@@ -63,7 +63,7 @@
doAlloc2()
}
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc2()
}
}
@@ -75,7 +75,7 @@
}
noInline(doDelete3)
- for (let i = 0; i < 100000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete3({ i, a: 4 })
}
@@ -88,7 +88,7 @@
doDelete3({ i, a: 4 })
}
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete3({ i, a: 4 })
}
}
@@ -105,7 +105,7 @@
}
noInline(doAlloc4)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc4()
}
}
@@ -127,7 +127,7 @@
}
noInline(doAlloc5)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc5()
}
}
@@ -147,7 +147,7 @@
}
noInline(doAlloc6)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc6()
}
}
@@ -169,7 +169,7 @@
}
noInline(doAlloc7)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doAlloc7()
}
}
@@ -186,7 +186,7 @@
doDelete8({ i, a: 4 })
}
- for (let i = 0; i < 100000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete8({ i, f: 4 })
assert(doDelete8({ i, e: 4, y: 10 }).y === undefined)
doDelete8({ i, d: 4 })
@@ -195,7 +195,7 @@
assert(doDelete8({ i, a: 4, y: 10 }).y === undefined)
}
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete8({ i, a: 4 })
}
}
@@ -216,7 +216,7 @@
polyvariant({ i, a: 4 })
}
- for (let i = 0; i < 100000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete9({ i, f: 4 })
assert(doDelete9({ i, e: 4, y: 10 }).y === undefined)
doDelete9({ i, d: 4 })
@@ -225,7 +225,7 @@
assert(doDelete9({ i, a: 4, y: 10 }).y === undefined)
}
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
polyvariant({ i, a: 4 })
}
}
@@ -242,7 +242,7 @@
}
noInline(doDelete10)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
assert(doDelete10({ i, a: 4, y: 10 }).y === undefined)
doDelete10({ i, f: 4 })
assert(doDelete10({ i, e: 4, y: 10 }).y === undefined)
@@ -271,7 +271,7 @@
}
noInline(doAlloc11)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
assert(doAlloc11(i % 3) == 2)
}
assert(doAlloc11(4) == 2)
@@ -303,10 +303,10 @@
noInline(doDelete12)
let foo = doAlloc12()
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete12(foo)
}
- assert(foo.count = 1000000)
+ assert(foo.count = iterationCount)
}
noInline(testProxy)
@@ -317,7 +317,7 @@
}
noInline(doDelete12)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
doDelete12(new Uint8Array())
}
@@ -334,7 +334,7 @@
}
noInline(doDelete13)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
assert(doDelete13({ y: 4 }))
let foo = {}
Object.defineProperty(foo, "x", {
@@ -352,7 +352,7 @@
}
noInline(doDelete14)
- for (let i = 0; i < 1000000; ++i) {
+ for (let i = 0; i < iterationCount; ++i) {
let foo = {}
Object.defineProperty(foo, "x", {
configurable: false,
@@ -376,7 +376,7 @@
}
noInline(doDelete15)
- for (let i = 0; i < 10000; ++i) {
+ function test() {
assert(doDelete15({ y: 4 }))
let foo = {}
Object.defineProperty(foo, "x", {
@@ -388,8 +388,18 @@
foo = { x: 4 }
assert(doDelete15(foo))
assert(foo.x == undefined)
+ }
+
+ for (let i = 0; i < 10; ++i) {
+ test();
gc()
}
+ for (let i = 0; i < iterationCount; ++i)
+ test();
+ for (let i = 0; i < 5; ++i) {
+ test();
+ gc();
+ }
}
noInline(testByVal)
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
