diff -r 22b8d3d181d9 -r 2e6857353b2c src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp --- a/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Wed Oct 03 20:31:41 2012 +0200 +++ b/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp Thu Oct 04 10:04:13 2012 -0700 @@ -87,7 +87,7 @@ // Compute desired plab size and latch result for later // use. This should be called once at the end of parallel // scavenge; it clears the sensor accumulators. -void PLABStats::adjust_desired_plab_sz() { +void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) { assert(ResizePLAB, "Not set"); if (_allocated == 0) { assert(_unused == 0, @@ -107,7 +107,7 @@ target_refills = 1; } _used = _allocated - _wasted - _unused; - size_t plab_sz = _used/(target_refills*ParallelGCThreads); + 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);