OpenJDK / bsd-port / jdk9 / hotspot
changeset 8822:7772d9bb4c14
8078904: CMS: Assert failed: Ctl pt invariant
Summary: Survivor rescan array now baed on MinTLABSize so all entries will fit
Reviewed-by: tschatzl, kbarrett
author | ecaspole |
---|---|
date | Fri, 07 Aug 2015 09:15:42 -0400 |
parents | 969105ebdecb |
children | a1609a58bc5a |
files | src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp |
diffstat | 2 files changed, 3 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Thu Aug 06 19:52:54 2015 +0200 +++ b/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Fri Aug 07 09:15:42 2015 -0400 @@ -620,12 +620,12 @@ // Support for parallelizing survivor space rescan if ((CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) || CMSParallelInitialMarkEnabled) { const size_t max_plab_samples = - ((DefNewGeneration*)_young_gen)->max_survivor_size() / plab_sample_minimum_size(); + _young_gen->max_survivor_size() / (ThreadLocalAllocBuffer::min_size() * HeapWordSize); _survivor_plab_array = NEW_C_HEAP_ARRAY(ChunkArray, ParallelGCThreads, mtGC); - _survivor_chunk_array = NEW_C_HEAP_ARRAY(HeapWord*, 2*max_plab_samples, mtGC); + _survivor_chunk_array = NEW_C_HEAP_ARRAY(HeapWord*, max_plab_samples, mtGC); _cursor = NEW_C_HEAP_ARRAY(size_t, ParallelGCThreads, mtGC); - _survivor_chunk_capacity = 2*max_plab_samples; + _survivor_chunk_capacity = max_plab_samples; for (uint i = 0; i < ParallelGCThreads; i++) { HeapWord** vec = NEW_C_HEAP_ARRAY(HeapWord*, max_plab_samples, mtGC); ChunkArray* cur = ::new (&_survivor_plab_array[i]) ChunkArray(vec, max_plab_samples); @@ -641,12 +641,6 @@ _inter_sweep_timer.start(); // start of time } -size_t CMSCollector::plab_sample_minimum_size() { - // The default value of MinTLABSize is 2k, but there is - // no way to get the default value if the flag has been overridden. - return MAX2(ThreadLocalAllocBuffer::min_size() * HeapWordSize, 2 * K); -} - const char* ConcurrentMarkSweepGeneration::name() const { return "concurrent mark-sweep generation"; }
--- a/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp Thu Aug 06 19:52:54 2015 +0200 +++ b/src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp Fri Aug 07 09:15:42 2015 -0400 @@ -739,10 +739,6 @@ size_t* _cursor; ChunkArray* _survivor_plab_array; - // A bounded minimum size of PLABs, should not return too small values since - // this will affect the size of the data structures used for parallel young gen rescan - size_t plab_sample_minimum_size(); - // Support for marking stack overflow handling bool take_from_overflow_list(size_t num, CMSMarkStack* to_stack); bool par_take_from_overflow_list(size_t num,