Title: [254617] branches/safari-609-branch
- Revision
- 254617
- Author
- alanc...@apple.com
- Date
- 2020-01-15 11:16:14 -0800 (Wed, 15 Jan 2020)
Log Message
Cherry-pick r254393. rdar://problem/58553158
[JSC] Flush old tables in End phase
https://bugs.webkit.org/show_bug.cgi?id=206120
<rdar://problem/58039989>
Reviewed by Mark Lam.
JSTests:
* stress/create-many-realms.js: Added.
(foo):
Source/_javascript_Core:
stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.
* heap/Heap.cpp:
(JSC::Heap::runEndPhase):
(JSC::Heap::stopThePeriphery):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-609-branch/JSTests/ChangeLog (254616 => 254617)
--- branches/safari-609-branch/JSTests/ChangeLog 2020-01-15 19:16:11 UTC (rev 254616)
+++ branches/safari-609-branch/JSTests/ChangeLog 2020-01-15 19:16:14 UTC (rev 254617)
@@ -1,3 +1,43 @@
+2020-01-15 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r254393. rdar://problem/58553158
+
+ [JSC] Flush old tables in End phase
+ https://bugs.webkit.org/show_bug.cgi?id=206120
+ <rdar://problem/58039989>
+
+ Reviewed by Mark Lam.
+
+ JSTests:
+
+ * stress/create-many-realms.js: Added.
+ (foo):
+
+ Source/_javascript_Core:
+
+ stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
+ It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
+ stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
+ in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
+ other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.
+
+ * heap/Heap.cpp:
+ (JSC::Heap::runEndPhase):
+ (JSC::Heap::stopThePeriphery):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-10 Yusuke Suzuki <ysuz...@apple.com>
+
+ [JSC] Flush old tables in End phase
+ https://bugs.webkit.org/show_bug.cgi?id=206120
+ <rdar://problem/58039989>
+
+ Reviewed by Mark Lam.
+
+ * stress/create-many-realms.js: Added.
+ (foo):
+
2020-01-14 Alan Coon <alanc...@apple.com>
Cherry-pick r254247. rdar://problem/58553146
Added: branches/safari-609-branch/JSTests/stress/create-many-realms.js (0 => 254617)
--- branches/safari-609-branch/JSTests/stress/create-many-realms.js (rev 0)
+++ branches/safari-609-branch/JSTests/stress/create-many-realms.js 2020-01-15 19:16:14 UTC (rev 254617)
@@ -0,0 +1,9 @@
+ //@ runDefault("--collectContinuously=1", "--collectContinuouslyPeriodMS=20", "--useGenerationalGC=0", "--useStochasticMutatorScheduler=0", "--useDFGJIT=0", "--useFTLJIT=0", "--maxPerThreadStackUsage=1000000")
+
+function foo(count) {
+ const x = createGlobalObject();
+ if (count === 100)
+ return;
+ return foo(count + 1);
+}
+foo(0);
Modified: branches/safari-609-branch/Source/_javascript_Core/ChangeLog (254616 => 254617)
--- branches/safari-609-branch/Source/_javascript_Core/ChangeLog 2020-01-15 19:16:11 UTC (rev 254616)
+++ branches/safari-609-branch/Source/_javascript_Core/ChangeLog 2020-01-15 19:16:14 UTC (rev 254617)
@@ -1,3 +1,50 @@
+2020-01-15 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r254393. rdar://problem/58553158
+
+ [JSC] Flush old tables in End phase
+ https://bugs.webkit.org/show_bug.cgi?id=206120
+ <rdar://problem/58039989>
+
+ Reviewed by Mark Lam.
+
+ JSTests:
+
+ * stress/create-many-realms.js: Added.
+ (foo):
+
+ Source/_javascript_Core:
+
+ stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
+ It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
+ stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
+ in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
+ other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.
+
+ * heap/Heap.cpp:
+ (JSC::Heap::runEndPhase):
+ (JSC::Heap::stopThePeriphery):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-10 Yusuke Suzuki <ysuz...@apple.com>
+
+ [JSC] Flush old tables in End phase
+ https://bugs.webkit.org/show_bug.cgi?id=206120
+ <rdar://problem/58039989>
+
+ Reviewed by Mark Lam.
+
+ stopThePeriphery is stopping compiler threads and main thread (mutator), which means making m_worldIsStopped = true.
+ It is not for stopping all heap threads including a concurrent marker. The concurrent collector can work while executing
+ stopThePeriphery. This means that concurrent collectors can access to the old StructureIDTable while it is destroyed
+ in stopThePeriphery. Destroying old StructureIDTable in GC End phase, this is appropriate phase that we can ensure no
+ other threads (accessing to heap) are working including concurrent markers, mutator, and compiler threads.
+
+ * heap/Heap.cpp:
+ (JSC::Heap::runEndPhase):
+ (JSC::Heap::stopThePeriphery):
+
2020-01-14 Alan Coon <alanc...@apple.com>
Cherry-pick r254244. rdar://problem/58553148
Modified: branches/safari-609-branch/Source/_javascript_Core/heap/Heap.cpp (254616 => 254617)
--- branches/safari-609-branch/Source/_javascript_Core/heap/Heap.cpp 2020-01-15 19:16:11 UTC (rev 254616)
+++ branches/safari-609-branch/Source/_javascript_Core/heap/Heap.cpp 2020-01-15 19:16:14 UTC (rev 254617)
@@ -1516,6 +1516,8 @@
if (vm().typeProfiler())
vm().typeProfiler()->invalidateTypeSetCache(vm());
+ m_structureIDTable.flushOldTables();
+
reapWeakHandles();
pruneStaleEntriesFromWeakGCMaps();
sweepArrayBuffers();
@@ -1663,7 +1665,6 @@
if (auto* shadowChicken = vm().shadowChicken())
shadowChicken->update(vm(), vm().topCallFrame);
- m_structureIDTable.flushOldTables();
m_objectSpace.stopAllocating();
m_stopTime = MonotonicTime::now();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes