src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Fri Apr  3 11:29:26 2015
--- new/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Fri Apr  3 11:29:25 2015

*** 32,42 **** --- 32,42 ---- #include "gc_implementation/shared/copyFailedInfo.hpp" #include "gc_implementation/shared/gcHeapSummary.hpp" #include "gc_implementation/shared/gcTimer.hpp" #include "gc_implementation/shared/gcTrace.hpp" #include "gc_implementation/shared/gcTraceTime.hpp" ! #include "gc_implementation/shared/parGCAllocBuffer.inline.hpp" ! #include "gc_implementation/shared/plab.inline.hpp" #include "gc_implementation/shared/spaceDecorator.hpp" #include "memory/defNewGeneration.inline.hpp" #include "memory/genCollectedHeap.hpp" #include "memory/genOopClosures.inline.hpp" #include "memory/generation.hpp"
*** 223,243 **** --- 223,243 ---- // Otherwise, if the object is small enough, try to reallocate the // buffer. HeapWord* obj = NULL; if (!_to_space_full) { ! ParGCAllocBuffer* const plab = to_space_alloc_buffer(); ! PLAB* const plab = to_space_alloc_buffer(); Space* const sp = to_space(); if (word_sz * 100 < ParallelGCBufferWastePct * plab->word_sz()) { // Is small enough; abandon this buffer and start a new one. plab->retire(); size_t buf_size = plab->word_sz(); HeapWord* buf_space = sp->par_allocate(buf_size); if (buf_space == NULL) { const size_t min_bytes = ! ParGCAllocBuffer::min_size() << LogHeapWordSize; ! PLAB::min_size() << LogHeapWordSize; size_t free_bytes = sp->free(); while(buf_space == NULL && free_bytes >= min_bytes) { buf_size = free_bytes >> LogHeapWordSize; assert(buf_size == (size_t)align_object_size(buf_size), "Invariant");
*** 249,259 **** --- 249,259 ---- plab->set_word_size(buf_size); plab->set_buf(buf_space); record_survivor_plab(buf_space, buf_size); obj = plab->allocate_aligned(word_sz, SurvivorAlignmentInBytes); // Note that we cannot compare buf_size < word_sz below ! // because of AlignmentReserve (see ParGCAllocBuffer::allocate()). ! // because of AlignmentReserve (see PLAB::allocate()). assert(obj != NULL || plab->words_remaining() < word_sz, "Else should have been able to allocate"); // It's conceivable that we may be able to use the // buffer we just grabbed for subsequent small requests // even if not for this one.

src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File