8073204: 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: ysr, jwilhelm, tschatzl
This commit is contained in:
Sangheon Kim 2015-04-28 12:02:50 -07:00
parent e08169c253
commit e207b18f10
9 changed files with 38 additions and 29 deletions

View file

@ -48,7 +48,7 @@ PLABStats* G1CollectedHeap::alloc_buffer_stats(InCSetState dest) {
}
size_t G1CollectedHeap::desired_plab_sz(InCSetState dest) {
size_t gclab_word_size = alloc_buffer_stats(dest)->desired_plab_sz();
size_t gclab_word_size = alloc_buffer_stats(dest)->desired_plab_sz(G1CollectedHeap::heap()->workers()->active_workers());
// Prevent humongous PLAB sizes for two reasons:
// * PLABs are allocated using a similar paths as oops, but should
// never be in a humongous region