提交 176f8b2e 编写于 作者: T tonyp

6928073: G1: use existing command line parameters for marking cycle initiation

Summary: replace the combination of the G1SteadyStateUsed / G1SteadyStateUsedDelta parameteres to decide the marking initiation threshold and instead use InitiatingHeapOccupancyPercent.
Reviewed-by: ysr, johnc
上级 b2063d4c
......@@ -299,10 +299,6 @@ void G1CollectorPolicy::init() {
assert(Heap_lock->owned_by_self(), "Locking discipline.");
if (G1SteadyStateUsed < 50) {
vm_exit_during_initialization("G1SteadyStateUsed must be at least 50%.");
}
initialize_gc_policy_counters();
if (G1Gen) {
......@@ -1425,7 +1421,7 @@ void G1CollectorPolicy::record_collection_pause_end(bool abandoned) {
record_concurrent_mark_init_end_pre(0.0);
size_t min_used_targ =
(_g1->capacity() / 100) * (G1SteadyStateUsed - G1SteadyStateUsedDelta);
(_g1->capacity() / 100) * InitiatingHeapOccupancyPercent;
if (cur_used_bytes > min_used_targ) {
if (cur_used_bytes <= _prev_collection_pause_used_at_end_bytes) {
......@@ -2618,13 +2614,6 @@ bool
G1CollectorPolicy_BestRegionsFirst::should_do_collection_pause(size_t
word_size) {
assert(_g1->regions_accounted_for(), "Region leakage!");
// Initiate a pause when we reach the steady-state "used" target.
size_t used_hard = (_g1->capacity() / 100) * G1SteadyStateUsed;
size_t used_soft =
MAX2((_g1->capacity() / 100) * (G1SteadyStateUsed - G1SteadyStateUsedDelta),
used_hard/2);
size_t used = _g1->used();
double max_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0;
size_t young_list_length = _g1->young_list_length();
......
......@@ -100,13 +100,6 @@
develop(intx, G1ConcZFMaxRegions, 1, \
"Stop zero-filling when # of zf'd regions reaches") \
\
product(intx, G1SteadyStateUsed, 90, \
"If non-0, try to maintain 'used' at this pct (of max)") \
\
product(intx, G1SteadyStateUsedDelta, 30, \
"If G1SteadyStateUsed is non-0, then do pause this number of " \
"of percentage points earlier if no marking is in progress.") \
\
develop(bool, G1SATBBarrierPrintNullPreVals, false, \
"If true, count frac of ptr writes with null pre-vals.") \
\
......
......@@ -1737,6 +1737,11 @@ bool Arguments::check_vm_args_consistency() {
status = false;
}
if (UseG1GC) {
status = status && verify_percentage(InitiatingHeapOccupancyPercent,
"InitiatingHeapOccupancyPercent");
}
status = status && verify_interval(RefDiscoveryPolicy,
ReferenceProcessor::DiscoveryPolicyMin,
ReferenceProcessor::DiscoveryPolicyMax,
......
......@@ -1724,6 +1724,13 @@ class CommandLineFlags {
"Percentage CMS generation occupancy to start a CMS collection " \
"cycle. A negative value means that CMSTriggerRatio is used") \
\
product(uintx, InitiatingHeapOccupancyPercent, 45, \
"Percentage of the (entire) heap occupancy to start a " \
"concurrent GC cycle. It us used by GCs that trigger a " \
"concurrent GC cycle based on the occupancy of the entire heap, " \
"not just one of the generations (e.g., G1). A value of 0 " \
"denotes 'do constant GC cycles'.") \
\
product(intx, CMSInitiatingPermOccupancyFraction, -1, \
"Percentage CMS perm generation occupancy to start a " \
"CMScollection cycle. A negative value means that " \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册