提交 04f8abc0 编写于 作者: T tonyp

7089625: G1: policy for how many old regions to add to the CSet (when young gen is fixed) is broken

Summary: When refactoring the code for a previous fix, a condition was not correctly negated which prevents the G1 policy from adding the correct number of old regions to the CSet when the young gen size is fixed. The changeset also fixes a small syntactical issue in g1ErgoVerbose.hpp which is causing compiler warnings.
Reviewed-by: brutisso, ysr
上级 fcf22dc0
......@@ -3042,10 +3042,10 @@ G1CollectorPolicy_BestRegionsFirst::choose_collection_set(
should_continue = false;
}
} else {
if (_collection_set_size < _young_list_fixed_length) {
if (_collection_set_size >= _young_list_fixed_length) {
ergo_verbose2(ErgoCSetConstruction,
"stop adding old regions to CSet",
ergo_format_reason("CSet length lower than target")
ergo_format_reason("CSet length reached target")
ergo_format_region("CSet")
ergo_format_region("young target"),
_collection_set_size, _young_list_fixed_length);
......
......@@ -58,7 +58,7 @@ typedef enum {
// ErgoLow is 0 so that we don't have to explicitly or a heuristic
// id with ErgoLow to keep its use simpler.
ErgoLow = 0,
ErgoHigh = 1 << ErgoLevelShift,
ErgoHigh = 1 << ErgoLevelShift
} ErgoLevel;
// The available heuristics.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册