< prev index next >

src/share/vm/gc/g1/g1DefaultPolicy.cpp

Print this page
rev 13332 : [mq]: webrev.4


  30 #include "gc/g1/g1CollectionSet.hpp"
  31 #include "gc/g1/g1ConcurrentMark.hpp"
  32 #include "gc/g1/g1DefaultPolicy.hpp"
  33 #include "gc/g1/g1HotCardCache.hpp"
  34 #include "gc/g1/g1IHOPControl.hpp"
  35 #include "gc/g1/g1GCPhaseTimes.hpp"
  36 #include "gc/g1/g1Policy.hpp"
  37 #include "gc/g1/g1SurvivorRegions.hpp"
  38 #include "gc/g1/g1YoungGenSizer.hpp"
  39 #include "gc/g1/heapRegion.inline.hpp"
  40 #include "gc/g1/heapRegionRemSet.hpp"
  41 #include "gc/shared/gcPolicyCounters.hpp"
  42 #include "logging/logStream.hpp"
  43 #include "runtime/arguments.hpp"
  44 #include "runtime/java.hpp"
  45 #include "runtime/mutexLocker.hpp"
  46 #include "utilities/debug.hpp"
  47 #include "utilities/growableArray.hpp"
  48 #include "utilities/pair.hpp"
  49 
  50 G1DefaultPolicy::G1DefaultPolicy() :
  51   _predictor(G1ConfidencePercent / 100.0),
  52   _analytics(new G1Analytics(&_predictor)),
  53   _mmu_tracker(new G1MMUTrackerQueue(GCPauseIntervalMillis / 1000.0, MaxGCPauseMillis / 1000.0)),
  54   _ihop_control(create_ihop_control(&_predictor)),
  55   _policy_counters(new GCPolicyCounters("GarbageFirst", 1, 3)),
  56   _young_list_fixed_length(0),
  57   _short_lived_surv_rate_group(new SurvRateGroup()),
  58   _survivor_surv_rate_group(new SurvRateGroup()),
  59   _reserve_factor((double) G1ReservePercent / 100.0),
  60   _reserve_regions(0),
  61   _rs_lengths_prediction(0),
  62   _bytes_allocated_in_old_since_last_gc(0),
  63   _initial_mark_to_mixed(),
  64   _collection_set(NULL),
  65   _g1(NULL),
  66   _phase_times(new G1GCPhaseTimes(ParallelGCThreads)),
  67   _tenuring_threshold(MaxTenuringThreshold),
  68   _max_survivor_regions(0),
  69   _survivors_age_table(true),
  70   _collection_pause_end_millis(os::javaTimeNanos() / NANOSECS_PER_MILLISEC) { }
  71 
  72 G1DefaultPolicy::~G1DefaultPolicy() {
  73   delete _ihop_control;
  74 }
  75 
  76 G1CollectorState* G1DefaultPolicy::collector_state() const { return _g1->collector_state(); }
  77 
  78 void G1DefaultPolicy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
  79   _g1 = g1h;
  80   _collection_set = collection_set;
  81 
  82   assert(Heap_lock->owned_by_self(), "Locking discipline.");
  83 
  84   if (!adaptive_young_list_length()) {
  85     _young_list_fixed_length = _young_gen_sizer.min_desired_young_length();
  86   }




  30 #include "gc/g1/g1CollectionSet.hpp"
  31 #include "gc/g1/g1ConcurrentMark.hpp"
  32 #include "gc/g1/g1DefaultPolicy.hpp"
  33 #include "gc/g1/g1HotCardCache.hpp"
  34 #include "gc/g1/g1IHOPControl.hpp"
  35 #include "gc/g1/g1GCPhaseTimes.hpp"
  36 #include "gc/g1/g1Policy.hpp"
  37 #include "gc/g1/g1SurvivorRegions.hpp"
  38 #include "gc/g1/g1YoungGenSizer.hpp"
  39 #include "gc/g1/heapRegion.inline.hpp"
  40 #include "gc/g1/heapRegionRemSet.hpp"
  41 #include "gc/shared/gcPolicyCounters.hpp"
  42 #include "logging/logStream.hpp"
  43 #include "runtime/arguments.hpp"
  44 #include "runtime/java.hpp"
  45 #include "runtime/mutexLocker.hpp"
  46 #include "utilities/debug.hpp"
  47 #include "utilities/growableArray.hpp"
  48 #include "utilities/pair.hpp"
  49 
  50 G1DefaultPolicy::G1DefaultPolicy(STWGCTimer* gc_timer) :
  51   _predictor(G1ConfidencePercent / 100.0),
  52   _analytics(new G1Analytics(&_predictor)),
  53   _mmu_tracker(new G1MMUTrackerQueue(GCPauseIntervalMillis / 1000.0, MaxGCPauseMillis / 1000.0)),
  54   _ihop_control(create_ihop_control(&_predictor)),
  55   _policy_counters(new GCPolicyCounters("GarbageFirst", 1, 3)),
  56   _young_list_fixed_length(0),
  57   _short_lived_surv_rate_group(new SurvRateGroup()),
  58   _survivor_surv_rate_group(new SurvRateGroup()),
  59   _reserve_factor((double) G1ReservePercent / 100.0),
  60   _reserve_regions(0),
  61   _rs_lengths_prediction(0),
  62   _bytes_allocated_in_old_since_last_gc(0),
  63   _initial_mark_to_mixed(),
  64   _collection_set(NULL),
  65   _g1(NULL),
  66   _phase_times(new G1GCPhaseTimes(gc_timer, ParallelGCThreads)),
  67   _tenuring_threshold(MaxTenuringThreshold),
  68   _max_survivor_regions(0),
  69   _survivors_age_table(true),
  70   _collection_pause_end_millis(os::javaTimeNanos() / NANOSECS_PER_MILLISEC) { }
  71 
  72 G1DefaultPolicy::~G1DefaultPolicy() {
  73   delete _ihop_control;
  74 }
  75 
  76 G1CollectorState* G1DefaultPolicy::collector_state() const { return _g1->collector_state(); }
  77 
  78 void G1DefaultPolicy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
  79   _g1 = g1h;
  80   _collection_set = collection_set;
  81 
  82   assert(Heap_lock->owned_by_self(), "Locking discipline.");
  83 
  84   if (!adaptive_young_list_length()) {
  85     _young_list_fixed_length = _young_gen_sizer.min_desired_young_length();
  86   }


< prev index next >