8079555: REDO - Determining the desired PLAB size adjusts to the the number of threads at the wrong place

Calculate the desired PLAB value for a single thread and then return desired PLAB size according to the current number of threads when needed

Reviewed-by: jmasa, tschatzl
This commit is contained in:
Sangheon Kim 2015-07-07 06:37:10 -07:00
parent 513b3b2ac1
commit 3e36930486
9 changed files with 37 additions and 30 deletions

View file

@ -1021,7 +1021,7 @@ void ParNewGeneration::collect(bool full,
to()->set_concurrent_iteration_safe_limit(to()->top());
if (ResizePLAB) {
plab_stats()->adjust_desired_plab_sz(active_workers);
plab_stats()->adjust_desired_plab_sz();
}
if (PrintGC && !PrintGCDetails) {
@ -1059,6 +1059,10 @@ void ParNewGeneration::collect(bool full,
_gc_tracer.report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions());
}
size_t ParNewGeneration::desired_plab_sz() {
return _plab_stats.desired_plab_sz(GenCollectedHeap::heap()->workers()->active_workers());
}
static int sum;
void ParNewGeneration::waste_some_time() {
for (int i = 0; i < 100; i++) {