# HG changeset patch # User ysr # Date 1296583321 28800 # Node ID e49cfa28f58582b4389a9264af8c5ee0479c6b51 # Parent b7a938236e4312113bed5b078e77e783dd404001 6999988: CMS: Increased fragmentation leading to promotion failure after CR#6631166 got implemented Summary: Fix calculation of _desired, in free list statistics, which was missing an intended set of parentheses. Reviewed-by: poonam, jmasa diff -r b7a938236e43 -r e49cfa28f585 src/share/vm/gc_implementation/shared/allocationStats.hpp --- a/src/share/vm/gc_implementation/shared/allocationStats.hpp Mon Jan 31 16:28:40 2011 -0500 +++ b/src/share/vm/gc_implementation/shared/allocationStats.hpp Tue Feb 01 10:02:01 2011 -0800 @@ -116,10 +116,8 @@ _demand_rate_estimate.sample(rate); float new_rate = _demand_rate_estimate.padded_average(); ssize_t old_desired = _desired; - _desired = (ssize_t)(new_rate * (inter_sweep_estimate - + CMSExtrapolateSweep - ? intra_sweep_estimate - : 0.0)); + float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0); + _desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise)); if (PrintFLSStatistics > 1) { gclog_or_tty->print_cr("demand: %d, old_rate: %f, current_rate: %f, new_rate: %f, old_desired: %d, new_desired: %d", demand, old_rate, rate, new_rate, old_desired, _desired);