90 double _cur_evac_fail_remove_self_forwards;
91
92 double _cur_string_dedup_fixup_time_ms;
93
94 double _cur_clear_ct_time_ms;
95 double _cur_ref_proc_time_ms;
96 double _cur_ref_enq_time_ms;
97
98 double _cur_collection_start_sec;
99 double _root_region_scan_wait_time_ms;
100
101 double _recorded_young_cset_choice_time_ms;
102 double _recorded_non_young_cset_choice_time_ms;
103
104 double _recorded_redirty_logged_cards_time_ms;
105
106 double _recorded_young_free_cset_time_ms;
107 double _recorded_non_young_free_cset_time_ms;
108
109 double _cur_fast_reclaim_humongous_time_ms;
110 size_t _cur_fast_reclaim_humongous_total;
111 size_t _cur_fast_reclaim_humongous_candidates;
112 size_t _cur_fast_reclaim_humongous_reclaimed;
113
114 double _cur_verify_before_time_ms;
115 double _cur_verify_after_time_ms;
116
117 // Helper methods for detailed logging
118 void print_stats(int level, const char* str, double value);
119 void print_stats(int level, const char* str, size_t value);
120 void print_stats(int level, const char* str, double value, uint workers);
121
122 public:
123 G1GCPhaseTimes(uint max_gc_threads);
124 void note_gc_start(uint active_gc_threads, bool mark_in_progress);
125 void note_gc_end();
126 void print(double pause_time_sec);
127
128 // record the time a phase took in seconds
129 void record_time_secs(GCParPhases phase, uint worker_i, double secs);
185 void record_ref_proc_time(double ms) {
186 _cur_ref_proc_time_ms = ms;
187 }
188
189 void record_ref_enq_time(double ms) {
190 _cur_ref_enq_time_ms = ms;
191 }
192
193 void record_root_region_scan_wait_time(double time_ms) {
194 _root_region_scan_wait_time_ms = time_ms;
195 }
196
197 void record_young_free_cset_time_ms(double time_ms) {
198 _recorded_young_free_cset_time_ms = time_ms;
199 }
200
201 void record_non_young_free_cset_time_ms(double time_ms) {
202 _recorded_non_young_free_cset_time_ms = time_ms;
203 }
204
205 void record_fast_reclaim_humongous_stats(size_t total, size_t candidates) {
206 _cur_fast_reclaim_humongous_total = total;
207 _cur_fast_reclaim_humongous_candidates = candidates;
208 }
209
210 void record_fast_reclaim_humongous_time_ms(double value, size_t reclaimed) {
211 _cur_fast_reclaim_humongous_time_ms = value;
212 _cur_fast_reclaim_humongous_reclaimed = reclaimed;
213 }
214
215 void record_young_cset_choice_time_ms(double time_ms) {
216 _recorded_young_cset_choice_time_ms = time_ms;
217 }
218
219 void record_non_young_cset_choice_time_ms(double time_ms) {
220 _recorded_non_young_cset_choice_time_ms = time_ms;
221 }
222
223 void record_redirty_logged_cards_time_ms(double time_ms) {
224 _recorded_redirty_logged_cards_time_ms = time_ms;
225 }
|
90 double _cur_evac_fail_remove_self_forwards;
91
92 double _cur_string_dedup_fixup_time_ms;
93
94 double _cur_clear_ct_time_ms;
95 double _cur_ref_proc_time_ms;
96 double _cur_ref_enq_time_ms;
97
98 double _cur_collection_start_sec;
99 double _root_region_scan_wait_time_ms;
100
101 double _recorded_young_cset_choice_time_ms;
102 double _recorded_non_young_cset_choice_time_ms;
103
104 double _recorded_redirty_logged_cards_time_ms;
105
106 double _recorded_young_free_cset_time_ms;
107 double _recorded_non_young_free_cset_time_ms;
108
109 double _cur_fast_reclaim_humongous_time_ms;
110 double _cur_fast_reclaim_humongous_register_time_ms;
111 size_t _cur_fast_reclaim_humongous_total;
112 size_t _cur_fast_reclaim_humongous_candidates;
113 size_t _cur_fast_reclaim_humongous_reclaimed;
114
115 double _cur_verify_before_time_ms;
116 double _cur_verify_after_time_ms;
117
118 // Helper methods for detailed logging
119 void print_stats(int level, const char* str, double value);
120 void print_stats(int level, const char* str, size_t value);
121 void print_stats(int level, const char* str, double value, uint workers);
122
123 public:
124 G1GCPhaseTimes(uint max_gc_threads);
125 void note_gc_start(uint active_gc_threads, bool mark_in_progress);
126 void note_gc_end();
127 void print(double pause_time_sec);
128
129 // record the time a phase took in seconds
130 void record_time_secs(GCParPhases phase, uint worker_i, double secs);
186 void record_ref_proc_time(double ms) {
187 _cur_ref_proc_time_ms = ms;
188 }
189
190 void record_ref_enq_time(double ms) {
191 _cur_ref_enq_time_ms = ms;
192 }
193
194 void record_root_region_scan_wait_time(double time_ms) {
195 _root_region_scan_wait_time_ms = time_ms;
196 }
197
198 void record_young_free_cset_time_ms(double time_ms) {
199 _recorded_young_free_cset_time_ms = time_ms;
200 }
201
202 void record_non_young_free_cset_time_ms(double time_ms) {
203 _recorded_non_young_free_cset_time_ms = time_ms;
204 }
205
206 void record_fast_reclaim_humongous_stats(double time_ms, size_t total, size_t candidates) {
207 _cur_fast_reclaim_humongous_register_time_ms = time_ms;
208 _cur_fast_reclaim_humongous_total = total;
209 _cur_fast_reclaim_humongous_candidates = candidates;
210 }
211
212 void record_fast_reclaim_humongous_time_ms(double value, size_t reclaimed) {
213 _cur_fast_reclaim_humongous_time_ms = value;
214 _cur_fast_reclaim_humongous_reclaimed = reclaimed;
215 }
216
217 void record_young_cset_choice_time_ms(double time_ms) {
218 _recorded_young_cset_choice_time_ms = time_ms;
219 }
220
221 void record_non_young_cset_choice_time_ms(double time_ms) {
222 _recorded_non_young_cset_choice_time_ms = time_ms;
223 }
224
225 void record_redirty_logged_cards_time_ms(double time_ms) {
226 _recorded_redirty_logged_cards_time_ms = time_ms;
227 }
|