# HG changeset patch # User poonam # Date 1297444578 28800 # Node ID befa5106b5e95e9005b968b0af67c84124094842 # Parent ac21d3bfa63b6809f9e4438d2a9089bb58b60ff8 6999988: CMS: Increased fragmentation leading to promotion failure after CR#6631166 got implemented Reviewed-by: ysr, minqi diff -r ac21d3bfa63b -r befa5106b5e9 src/share/vm/gc_implementation/shared/allocationStats.hpp --- a/src/share/vm/gc_implementation/shared/allocationStats.hpp Thu Feb 10 12:16:35 2011 -0800 +++ b/src/share/vm/gc_implementation/shared/allocationStats.hpp Fri Feb 11 09:16:18 2011 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,10 +116,10 @@ _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);