Disallow synchronous sweeping for eden GCs.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Aug 2016 21:18:14 +0000 (21:18 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Aug 2016 21:18:14 +0000 (21:18 +0000)
commite9cf2c14bacc1756e9c12a86cf8bb12378262f55
treed4bfc7c1ea0921443b767ae850b12e76a700ae66
parent15679c54c9316778aad2aefa2d05d33198f093f5
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/eden-gc-with-retired-blocks.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/MarkedBlock.cpp
Source/JavaScriptCore/heap/MarkedBlock.h
Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp