From 323940a595df98f03614aa4ed5ad14a9595bb93a Mon Sep 17 00:00:00 2001 From: johnc Date: Fri, 21 Dec 2012 11:45:34 -0800 Subject: [PATCH] 8001424: G1: Rename certain G1-specific flags Summary: Rename G1DefaultMinNewGenPercent, G1DefaultMaxNewGenPercent, and G1OldCSetRegionLiveThresholdPercent to G1NewSizePercent, G1MaxNewSizePercent, and G1MixedGCLiveThresholdPercent respectively. The previous names are no longer accepted. Reviewed-by: brutisso, ysr --- .../g1/collectionSetChooser.cpp | 2 +- .../g1/g1CollectorPolicy.cpp | 10 ++++---- .../g1/g1CollectorPolicy.hpp | 16 ++++++------- .../vm/gc_implementation/g1/g1_globals.hpp | 23 ++++++++++--------- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp b/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp index 663011a77..f4c6a7143 100644 --- a/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp +++ b/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp @@ -85,7 +85,7 @@ CollectionSetChooser::CollectionSetChooser() : _curr_index(0), _length(0), _first_par_unreserved_idx(0), _region_live_threshold_bytes(0), _remaining_reclaimable_bytes(0) { _region_live_threshold_bytes = - HeapRegion::GrainBytes * (size_t) G1OldCSetRegionLiveThresholdPercent / 100; + HeapRegion::GrainBytes * (size_t) G1MixedGCLiveThresholdPercent / 100; } #ifndef PRODUCT diff --git a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 6e9170a00..168fc3376 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -309,9 +309,9 @@ void G1CollectorPolicy::initialize_flags() { } G1YoungGenSizer::G1YoungGenSizer() : _sizer_kind(SizerDefaults), _adaptive_size(true) { - assert(G1DefaultMinNewGenPercent <= G1DefaultMaxNewGenPercent, "Min larger than max"); - assert(G1DefaultMinNewGenPercent > 0 && G1DefaultMinNewGenPercent < 100, "Min out of bounds"); - assert(G1DefaultMaxNewGenPercent > 0 && G1DefaultMaxNewGenPercent < 100, "Max out of bounds"); + assert(G1NewSizePercent <= G1MaxNewSizePercent, "Min larger than max"); + assert(G1NewSizePercent > 0 && G1NewSizePercent < 100, "Min out of bounds"); + assert(G1MaxNewSizePercent > 0 && G1MaxNewSizePercent < 100, "Max out of bounds"); if (FLAG_IS_CMDLINE(NewRatio)) { if (FLAG_IS_CMDLINE(NewSize) || FLAG_IS_CMDLINE(MaxNewSize)) { @@ -344,12 +344,12 @@ G1YoungGenSizer::G1YoungGenSizer() : _sizer_kind(SizerDefaults), _adaptive_size( } uint G1YoungGenSizer::calculate_default_min_length(uint new_number_of_heap_regions) { - uint default_value = (new_number_of_heap_regions * G1DefaultMinNewGenPercent) / 100; + uint default_value = (new_number_of_heap_regions * G1NewSizePercent) / 100; return MAX2(1U, default_value); } uint G1YoungGenSizer::calculate_default_max_length(uint new_number_of_heap_regions) { - uint default_value = (new_number_of_heap_regions * G1DefaultMaxNewGenPercent) / 100; + uint default_value = (new_number_of_heap_regions * G1MaxNewSizePercent) / 100; return MAX2(1U, default_value); } diff --git a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp index b7d810dbb..d32d1e66c 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @@ -94,18 +94,18 @@ class TraceGen1TimeData : public CHeapObj { // will occur. // // If nothing related to the the young gen size is set on the command -// line we should allow the young gen to be between -// G1DefaultMinNewGenPercent and G1DefaultMaxNewGenPercent of the -// heap size. This means that every time the heap size changes the -// limits for the young gen size will be updated. +// line we should allow the young gen to be between G1NewSizePercent +// and G1MaxNewSizePercent of the heap size. This means that every time +// the heap size changes, the limits for the young gen size will be +// recalculated. // // If only -XX:NewSize is set we should use the specified value as the -// minimum size for young gen. Still using G1DefaultMaxNewGenPercent -// of the heap as maximum. +// minimum size for young gen. Still using G1MaxNewSizePercent of the +// heap as maximum. // // If only -XX:MaxNewSize is set we should use the specified value as the -// maximum size for young gen. Still using G1DefaultMinNewGenPercent -// of the heap as minimum. +// maximum size for young gen. Still using G1NewSizePercent of the heap +// as minimum. // // If -XX:NewSize and -XX:MaxNewSize are both specified we use these values. // No updates when the heap size changes. There is a special case when diff --git a/src/share/vm/gc_implementation/g1/g1_globals.hpp b/src/share/vm/gc_implementation/g1/g1_globals.hpp index a8405e0c5..92b1cb3fc 100644 --- a/src/share/vm/gc_implementation/g1/g1_globals.hpp +++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp @@ -287,17 +287,18 @@ "The number of times we'll force an overflow during " \ "concurrent marking") \ \ - experimental(uintx, G1DefaultMinNewGenPercent, 20, \ - "Percentage (0-100) of the heap size to use as minimum " \ - "young gen size.") \ - \ - experimental(uintx, G1DefaultMaxNewGenPercent, 80, \ - "Percentage (0-100) of the heap size to use as maximum " \ - "young gen size.") \ - \ - experimental(uintx, G1OldCSetRegionLiveThresholdPercent, 90, \ - "Threshold for regions to be added to the collection set. " \ - "Regions with more live bytes than this will not be collected.") \ + experimental(uintx, G1NewSizePercent, 20, \ + "Percentage (0-100) of the heap size to use as default " \ + "minimum young gen size.") \ + \ + experimental(uintx, G1MaxNewSizePercent, 80, \ + "Percentage (0-100) of the heap size to use as default " \ + " maximum young gen size.") \ + \ + experimental(uintx, G1MixedGCLiveThresholdPercent, 90, \ + "Threshold for regions to be considered for inclusion in the " \ + "collection set of mixed GCs. " \ + "Regions with live bytes exceeding this will not be collected.") \ \ product(uintx, G1HeapWastePercent, 5, \ "Amount of space, expressed as a percentage of the heap size, " \ -- GitLab