src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp
Print this page
rev 6220 : [mq]: printffmt_size.gc.patch
*** 110,128 ****
if (target_refills == 0) {
target_refills = 1;
}
_used = _allocated - _wasted - _unused;
size_t plab_sz = _used/(target_refills*no_of_gc_workers);
! if (PrintPLAB) gclog_or_tty->print(" (plab_sz = %d ", plab_sz);
// Take historical weighted average
_filter.sample(plab_sz);
// Clip from above and below, and align to object boundary
plab_sz = MAX2(min_size(), (size_t)_filter.average());
plab_sz = MIN2(max_size(), plab_sz);
plab_sz = align_object_size(plab_sz);
// Latch the result
! if (PrintPLAB) gclog_or_tty->print(" desired_plab_sz = %d) ", plab_sz);
_desired_plab_sz = plab_sz;
// Now clear the accumulators for next round:
// note this needs to be fixed in the case where we
// are retaining across scavenges. FIX ME !!! XXX
_allocated = 0;
--- 110,128 ----
if (target_refills == 0) {
target_refills = 1;
}
_used = _allocated - _wasted - _unused;
size_t plab_sz = _used/(target_refills*no_of_gc_workers);
! if (PrintPLAB) gclog_or_tty->print(" (plab_sz = " SIZE_FORMAT " ", plab_sz);
// Take historical weighted average
_filter.sample(plab_sz);
// Clip from above and below, and align to object boundary
plab_sz = MAX2(min_size(), (size_t)_filter.average());
plab_sz = MIN2(max_size(), plab_sz);
plab_sz = align_object_size(plab_sz);
// Latch the result
! if (PrintPLAB) gclog_or_tty->print(" desired_plab_sz = " SIZE_FORMAT ") ", plab_sz);
_desired_plab_sz = plab_sz;
// Now clear the accumulators for next round:
// note this needs to be fixed in the case where we
// are retaining across scavenges. FIX ME !!! XXX
_allocated = 0;