Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Disallow synchronous sweeping for eden GCs.
https://bugs.webkit.org/show_bug.cgi?id=160716 Reviewed by Geoffrey Garen. JSTests: * stress/eden-gc-with-retired-blocks.js: Added. - This test is just in case we add back support for eden GCs with synchronous sweeping in the future. Source/JavaScriptCore: * heap/Heap.cpp: (JSC::Heap::collectAllGarbage): (JSC::Heap::collectAndSweep): Deleted. * heap/Heap.h: (JSC::Heap::collectAllGarbage): Deleted. - No need for a separate collectAndSweep() anymore since we only call it for FullCollections. - Since we've already swept all the blocks, I cleared m_blockSnapshot so that the IncrementalSweeper can bail earlier when it runs later. * heap/MarkedBlock.cpp: (JSC::MarkedBlock::sweepHelper): - Removed the unreachable return statement. * heap/MarkedBlock.h: - Document what "Retired" means. * tools/JSDollarVMPrototype.cpp: (JSC::JSDollarVMPrototype::edenGC): Canonical link: https://commits.webkit.org/178898@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
8 changed files
with
79 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//@ runDefault | ||
// This test should not crash. | ||
|
||
var objs; | ||
|
||
for (let i = 0; i < 500; i += 100) { | ||
objs = []; | ||
gc(); | ||
|
||
// Make "Retired" blocks. | ||
for (let j = 0; j < i; j++) { | ||
let o; | ||
switch (i % 6) { | ||
case 0: o = { }; | ||
case 1: o = { a: i }; | ||
case 2: o = { a: i, b: i}; | ||
case 3: o = { a: i, b: i, c: i }; | ||
case 4: o = { a: i, b: i, c: i, d: i }; | ||
case 5: o = { a: i, b: i, c: i, d: i, e: i }; | ||
} | ||
objs[j] = o; | ||
} | ||
edenGC(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters