comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 6756:b2ef234911c9

7190666: G1: assert(_unused == 0) failed: Inconsistency in PLAB stats Summary: Reset the fields in ParGCAllocBuffer, that are used for accumulating values for the ResizePLAB sensors in PLABStats, to zero after flushing the values to the PLABStats fields. Flush PLABStats values only when retiring the final allocation buffers prior to disposing of a G1ParScanThreadState object, rather than when retiring every allocation buffer. Reviewed-by: jwilhelm, jmasa, ysr
author johnc
date Thu, 20 Sep 2012 09:52:56 -0700
parents 9646b7ff4d14
children 2e6857353b2c
comparison
equal deleted inserted replaced
6755:bc675e55b48c 6756:b2ef234911c9
1849 HeapWord* obj = NULL; 1849 HeapWord* obj = NULL;
1850 size_t gclab_word_size = _g1h->desired_plab_sz(purpose); 1850 size_t gclab_word_size = _g1h->desired_plab_sz(purpose);
1851 if (word_sz * 100 < gclab_word_size * ParallelGCBufferWastePct) { 1851 if (word_sz * 100 < gclab_word_size * ParallelGCBufferWastePct) {
1852 G1ParGCAllocBuffer* alloc_buf = alloc_buffer(purpose); 1852 G1ParGCAllocBuffer* alloc_buf = alloc_buffer(purpose);
1853 add_to_alloc_buffer_waste(alloc_buf->words_remaining()); 1853 add_to_alloc_buffer_waste(alloc_buf->words_remaining());
1854 alloc_buf->flush_stats_and_retire(_g1h->stats_for_purpose(purpose), 1854 alloc_buf->retire(false /* end_of_gc */, false /* retain */);
1855 false /* end_of_gc */,
1856 false /* retain */);
1857 1855
1858 HeapWord* buf = _g1h->par_allocate_during_gc(purpose, gclab_word_size); 1856 HeapWord* buf = _g1h->par_allocate_during_gc(purpose, gclab_word_size);
1859 if (buf == NULL) return NULL; // Let caller handle allocation failure. 1857 if (buf == NULL) return NULL; // Let caller handle allocation failure.
1860 // Otherwise. 1858 // Otherwise.
1861 alloc_buf->set_word_size(gclab_word_size); 1859 alloc_buf->set_word_size(gclab_word_size);