164 165 _num_phases 166 }; 167 168 private: 169 struct TimingData { 170 HdrSeq _secs; 171 double _start; 172 size_t _count; 173 }; 174 175 private: 176 TimingData _timing_data[_num_phases]; 177 const char* _phase_names[_num_phases]; 178 179 size_t _user_requested_gcs; 180 size_t _allocation_failure_gcs; 181 size_t _degenerated_cm; 182 size_t _successful_cm; 183 184 ShenandoahHeuristics* _heuristics; 185 ShenandoahTracer* _tracer; 186 STWGCTimer* _stw_timer; 187 ConcurrentGCTimer* _conc_timer; 188 189 bool _conc_gc_aborted; 190 191 size_t _cycle_counter; 192 193 ShenandoahPhaseTimes* _phase_times; 194 195 public: 196 ShenandoahCollectorPolicy(); 197 198 ShenandoahPhaseTimes* phase_times(); 199 200 virtual ShenandoahCollectorPolicy* as_pgc_policy(); 201 202 BarrierSet::Name barrier_set_name(); 203 220 void record_workers_start(TimingPhase phase); 221 void record_workers_end(TimingPhase phase); 222 223 void report_concgc_cancelled(); 224 225 void record_user_requested_gc(); 226 void record_allocation_failure_gc(); 227 228 void record_bytes_allocated(size_t bytes); 229 void record_bytes_reclaimed(size_t bytes); 230 void record_bytes_start_CM(size_t bytes); 231 void record_bytes_end_CM(size_t bytes); 232 bool should_start_concurrent_mark(size_t used, size_t capacity); 233 bool should_start_partial_gc(); 234 235 // Returns true when there should be a separate concurrent reference 236 // updating phase after evacuation. 237 bool update_refs_early(); 238 239 bool handover_cancelled_marking(); 240 241 void record_cm_cancelled(); 242 void record_cm_success(); 243 void record_cm_degenerated(); 244 void record_full_gc(); 245 246 void choose_collection_set(ShenandoahCollectionSet* collection_set, int* connections=NULL); 247 void choose_free_set(ShenandoahFreeSet* free_set); 248 249 bool process_references(); 250 bool unload_classes(); 251 252 void print_tracing_info(outputStream* out); 253 254 GCTimer* conc_timer(){return _conc_timer;} 255 GCTimer* stw_timer() {return _stw_timer;} 256 ShenandoahTracer* tracer() {return _tracer;} 257 258 void set_conc_gc_aborted() { _conc_gc_aborted = true;} 259 void clear_conc_gc_aborted() {_conc_gc_aborted = false;} 260 261 void increase_cycle_counter(); 262 size_t cycle_counter() const; 263 264 | 164 165 _num_phases 166 }; 167 168 private: 169 struct TimingData { 170 HdrSeq _secs; 171 double _start; 172 size_t _count; 173 }; 174 175 private: 176 TimingData _timing_data[_num_phases]; 177 const char* _phase_names[_num_phases]; 178 179 size_t _user_requested_gcs; 180 size_t _allocation_failure_gcs; 181 size_t _degenerated_cm; 182 size_t _successful_cm; 183 184 size_t _degenerated_uprefs; 185 size_t _successful_uprefs; 186 187 ShenandoahHeuristics* _heuristics; 188 ShenandoahTracer* _tracer; 189 STWGCTimer* _stw_timer; 190 ConcurrentGCTimer* _conc_timer; 191 192 bool _conc_gc_aborted; 193 194 size_t _cycle_counter; 195 196 ShenandoahPhaseTimes* _phase_times; 197 198 public: 199 ShenandoahCollectorPolicy(); 200 201 ShenandoahPhaseTimes* phase_times(); 202 203 virtual ShenandoahCollectorPolicy* as_pgc_policy(); 204 205 BarrierSet::Name barrier_set_name(); 206 223 void record_workers_start(TimingPhase phase); 224 void record_workers_end(TimingPhase phase); 225 226 void report_concgc_cancelled(); 227 228 void record_user_requested_gc(); 229 void record_allocation_failure_gc(); 230 231 void record_bytes_allocated(size_t bytes); 232 void record_bytes_reclaimed(size_t bytes); 233 void record_bytes_start_CM(size_t bytes); 234 void record_bytes_end_CM(size_t bytes); 235 bool should_start_concurrent_mark(size_t used, size_t capacity); 236 bool should_start_partial_gc(); 237 238 // Returns true when there should be a separate concurrent reference 239 // updating phase after evacuation. 240 bool update_refs_early(); 241 242 bool handover_cancelled_marking(); 243 bool handover_cancelled_uprefs(); 244 245 void record_cm_cancelled(); 246 void record_cm_success(); 247 void record_cm_degenerated(); 248 void record_full_gc(); 249 void record_uprefs_cancelled(); 250 void record_uprefs_success(); 251 void record_uprefs_degenerated(); 252 253 void choose_collection_set(ShenandoahCollectionSet* collection_set, int* connections=NULL); 254 void choose_free_set(ShenandoahFreeSet* free_set); 255 256 bool process_references(); 257 bool unload_classes(); 258 259 void print_tracing_info(outputStream* out); 260 261 GCTimer* conc_timer(){return _conc_timer;} 262 GCTimer* stw_timer() {return _stw_timer;} 263 ShenandoahTracer* tracer() {return _tracer;} 264 265 void set_conc_gc_aborted() { _conc_gc_aborted = true;} 266 void clear_conc_gc_aborted() {_conc_gc_aborted = false;} 267 268 void increase_cycle_counter(); 269 size_t cycle_counter() const; 270 271 |