File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ G1PLABAllocator::G1PLABAllocator(G1Allocator* allocator) :
339339 if (ResizePLAB) {
340340 // See G1EvacStats::compute_desired_plab_sz for the reasoning why this is the
341341 // expected number of refills.
342- double const ExpectedNumberOfRefills = G1LastPLABAverageOccupancy / TargetPLABWastePct;
342+ double const ExpectedNumberOfRefills = ( 100 - G1LastPLABAverageOccupancy) / TargetPLABWastePct;
343343 // Add some padding to the threshold to not boost exactly when the targeted refills
344344 // were reached.
345345 // E.g. due to limitation of PLAB size to non-humongous objects and region boundaries
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ size_t G1EvacStats::compute_desired_plab_size() const {
8585 // also assume that that buffer is typically half-full (G1LastPLABAverageOccupancy),
8686 // the new desired PLAB size is set to 20 words.
8787 //
88- // (This also implies that we expect G1LastPLABAverageOccupancy/TargetPLABWastePct
88+ // (This also implies that we expect (100- G1LastPLABAverageOccupancy) /TargetPLABWastePct
8989 // number of refills during allocation).
9090 //
9191 // The amount of allocation performed should be independent of the number of
@@ -113,7 +113,7 @@ size_t G1EvacStats::compute_desired_plab_size() const {
113113 size_t const used_for_waste_calculation = used () > _region_end_waste ? used () - _region_end_waste : 0 ;
114114
115115 size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct;
116- return (size_t )((double )total_waste_allowed / G1LastPLABAverageOccupancy);
116+ return (size_t )((double )total_waste_allowed / ( 100 - G1LastPLABAverageOccupancy) );
117117}
118118
119119G1EvacStats::G1EvacStats (const char * description, size_t default_per_thread_plab_size, unsigned wt) :
You can’t perform that action at this time.
0 commit comments