src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp

Print this page
rev 5920 : 8035406: Improve data structure for Code Cache remembered sets
Summary: Change the code cache remembered sets data structure from a GrowableArray to a chunked list of nmethods. This makes the data structure more amenable to parallelization, and decreases freeing time.
Reviewed-by:
rev 5922 : 8035398: Add card redirty time in "Other" time in G1
Summary: Show the time taken by card redirtying during GC in a new "Redirty Cards" line.
Reviewed-by:


 126   WorkerDataArray<size_t> _last_termination_attempts;
 127   WorkerDataArray<double> _last_gc_worker_end_times_ms;
 128   WorkerDataArray<double> _last_gc_worker_times_ms;
 129   WorkerDataArray<double> _last_gc_worker_other_times_ms;
 130 
 131   double _cur_collection_par_time_ms;
 132   double _cur_collection_code_root_fixup_time_ms;
 133   double _cur_strong_code_root_migration_time_ms;
 134   double _cur_strong_code_root_purge_time_ms;
 135 
 136   double _cur_clear_ct_time_ms;
 137   double _cur_ref_proc_time_ms;
 138   double _cur_ref_enq_time_ms;
 139 
 140   double _cur_collection_start_sec;
 141   double _root_region_scan_wait_time_ms;
 142 
 143   double _recorded_young_cset_choice_time_ms;
 144   double _recorded_non_young_cset_choice_time_ms;
 145 


 146   double _recorded_young_free_cset_time_ms;
 147   double _recorded_non_young_free_cset_time_ms;
 148 
 149   double _cur_verify_before_time_ms;
 150   double _cur_verify_after_time_ms;
 151 
 152   // Helper methods for detailed logging
 153   void print_stats(int level, const char* str, double value);
 154   void print_stats(int level, const char* str, double value, int workers);
 155 
 156  public:
 157   G1GCPhaseTimes(uint max_gc_threads);
 158   void note_gc_start(uint active_gc_threads);
 159   void note_gc_end();
 160   void print(double pause_time_sec);
 161 
 162   void record_gc_worker_start_time(uint worker_i, double ms) {
 163     _last_gc_worker_start_times_ms.set(worker_i, ms);
 164   }
 165 


 237   }
 238 
 239   void record_root_region_scan_wait_time(double time_ms) {
 240     _root_region_scan_wait_time_ms = time_ms;
 241   }
 242 
 243   void record_young_free_cset_time_ms(double time_ms) {
 244     _recorded_young_free_cset_time_ms = time_ms;
 245   }
 246 
 247   void record_non_young_free_cset_time_ms(double time_ms) {
 248     _recorded_non_young_free_cset_time_ms = time_ms;
 249   }
 250 
 251   void record_young_cset_choice_time_ms(double time_ms) {
 252     _recorded_young_cset_choice_time_ms = time_ms;
 253   }
 254 
 255   void record_non_young_cset_choice_time_ms(double time_ms) {
 256     _recorded_non_young_cset_choice_time_ms = time_ms;




 257   }
 258 
 259   void record_cur_collection_start_sec(double time_ms) {
 260     _cur_collection_start_sec = time_ms;
 261   }
 262 
 263   void record_verify_before_time_ms(double time_ms) {
 264     _cur_verify_before_time_ms = time_ms;
 265   }
 266 
 267   void record_verify_after_time_ms(double time_ms) {
 268     _cur_verify_after_time_ms = time_ms;
 269   }
 270 
 271   double accounted_time_ms();
 272 
 273   double cur_collection_start_sec() {
 274     return _cur_collection_start_sec;
 275   }
 276 




 126   WorkerDataArray<size_t> _last_termination_attempts;
 127   WorkerDataArray<double> _last_gc_worker_end_times_ms;
 128   WorkerDataArray<double> _last_gc_worker_times_ms;
 129   WorkerDataArray<double> _last_gc_worker_other_times_ms;
 130 
 131   double _cur_collection_par_time_ms;
 132   double _cur_collection_code_root_fixup_time_ms;
 133   double _cur_strong_code_root_migration_time_ms;
 134   double _cur_strong_code_root_purge_time_ms;
 135 
 136   double _cur_clear_ct_time_ms;
 137   double _cur_ref_proc_time_ms;
 138   double _cur_ref_enq_time_ms;
 139 
 140   double _cur_collection_start_sec;
 141   double _root_region_scan_wait_time_ms;
 142 
 143   double _recorded_young_cset_choice_time_ms;
 144   double _recorded_non_young_cset_choice_time_ms;
 145 
 146   double _recorded_redirty_logged_cards_time_ms;
 147 
 148   double _recorded_young_free_cset_time_ms;
 149   double _recorded_non_young_free_cset_time_ms;
 150 
 151   double _cur_verify_before_time_ms;
 152   double _cur_verify_after_time_ms;
 153 
 154   // Helper methods for detailed logging
 155   void print_stats(int level, const char* str, double value);
 156   void print_stats(int level, const char* str, double value, int workers);
 157 
 158  public:
 159   G1GCPhaseTimes(uint max_gc_threads);
 160   void note_gc_start(uint active_gc_threads);
 161   void note_gc_end();
 162   void print(double pause_time_sec);
 163 
 164   void record_gc_worker_start_time(uint worker_i, double ms) {
 165     _last_gc_worker_start_times_ms.set(worker_i, ms);
 166   }
 167 


 239   }
 240 
 241   void record_root_region_scan_wait_time(double time_ms) {
 242     _root_region_scan_wait_time_ms = time_ms;
 243   }
 244 
 245   void record_young_free_cset_time_ms(double time_ms) {
 246     _recorded_young_free_cset_time_ms = time_ms;
 247   }
 248 
 249   void record_non_young_free_cset_time_ms(double time_ms) {
 250     _recorded_non_young_free_cset_time_ms = time_ms;
 251   }
 252 
 253   void record_young_cset_choice_time_ms(double time_ms) {
 254     _recorded_young_cset_choice_time_ms = time_ms;
 255   }
 256 
 257   void record_non_young_cset_choice_time_ms(double time_ms) {
 258     _recorded_non_young_cset_choice_time_ms = time_ms;
 259   }
 260 
 261   void record_redirty_logged_cards_time_ms(double time_ms) {
 262     _recorded_redirty_logged_cards_time_ms = time_ms;
 263   }
 264 
 265   void record_cur_collection_start_sec(double time_ms) {
 266     _cur_collection_start_sec = time_ms;
 267   }
 268 
 269   void record_verify_before_time_ms(double time_ms) {
 270     _cur_verify_before_time_ms = time_ms;
 271   }
 272 
 273   void record_verify_after_time_ms(double time_ms) {
 274     _cur_verify_after_time_ms = time_ms;
 275   }
 276 
 277   double accounted_time_ms();
 278 
 279   double cur_collection_start_sec() {
 280     return _cur_collection_start_sec;
 281   }
 282