< prev index next >

src/hotspot/share/gc/g1/g1Policy.cpp

Print this page
rev 59308 : imported patch 8243672-sjohanss-review


 101 
 102 G1CollectorState* G1Policy::collector_state() const { return _g1h->collector_state(); }
 103 
 104 void G1Policy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
 105   _g1h = g1h;
 106   _collection_set = collection_set;
 107 
 108   assert(Heap_lock->owned_by_self(), "Locking discipline.");
 109 
 110   if (!use_adaptive_young_list_length()) {
 111     _young_list_fixed_length = _young_gen_sizer->min_desired_young_length();
 112   }
 113   _young_gen_sizer->adjust_max_new_size(_g1h->max_expandable_regions());
 114 
 115   _free_regions_at_end_of_collection = _g1h->num_free_regions();
 116 
 117   update_young_list_max_and_target_length();
 118   // We may immediately start allocating regions and placing them on the
 119   // collection set list. Initialize the per-collection set info
 120   _collection_set->start_incremental_building();
 121 
 122   double now = os::elapsedTime();
 123   _analytics->update_recent_gc_times(now, 0.0);
 124 }
 125 
 126 void G1Policy::note_gc_start() {
 127   phase_times()->note_gc_start();
 128 }
 129 
 130 class G1YoungLengthPredictor {
 131   const double _base_time_ms;
 132   const double _base_free_regions;
 133   const double _target_pause_time_ms;
 134   const G1Policy* const _policy;
 135 
 136  public:
 137   G1YoungLengthPredictor(double base_time_ms,
 138                          double base_free_regions,
 139                          double target_pause_time_ms,
 140                          const G1Policy* policy) :
 141     _base_time_ms(base_time_ms),
 142     _base_free_regions(base_free_regions),
 143     _target_pause_time_ms(target_pause_time_ms),




 101 
 102 G1CollectorState* G1Policy::collector_state() const { return _g1h->collector_state(); }
 103 
 104 void G1Policy::init(G1CollectedHeap* g1h, G1CollectionSet* collection_set) {
 105   _g1h = g1h;
 106   _collection_set = collection_set;
 107 
 108   assert(Heap_lock->owned_by_self(), "Locking discipline.");
 109 
 110   if (!use_adaptive_young_list_length()) {
 111     _young_list_fixed_length = _young_gen_sizer->min_desired_young_length();
 112   }
 113   _young_gen_sizer->adjust_max_new_size(_g1h->max_expandable_regions());
 114 
 115   _free_regions_at_end_of_collection = _g1h->num_free_regions();
 116 
 117   update_young_list_max_and_target_length();
 118   // We may immediately start allocating regions and placing them on the
 119   // collection set list. Initialize the per-collection set info
 120   _collection_set->start_incremental_building();



 121 }
 122 
 123 void G1Policy::note_gc_start() {
 124   phase_times()->note_gc_start();
 125 }
 126 
 127 class G1YoungLengthPredictor {
 128   const double _base_time_ms;
 129   const double _base_free_regions;
 130   const double _target_pause_time_ms;
 131   const G1Policy* const _policy;
 132 
 133  public:
 134   G1YoungLengthPredictor(double base_time_ms,
 135                          double base_free_regions,
 136                          double target_pause_time_ms,
 137                          const G1Policy* policy) :
 138     _base_time_ms(base_time_ms),
 139     _base_free_regions(base_free_regions),
 140     _target_pause_time_ms(target_pause_time_ms),


< prev index next >