90 UpdateRSProcessedBuffers, |
92 UpdateRSProcessedBuffers, |
91 UpdateRSScannedCards, |
93 UpdateRSScannedCards, |
92 UpdateRSSkippedCards |
94 UpdateRSSkippedCards |
93 }; |
95 }; |
94 |
96 |
|
97 enum GCOptCSetWorkItems { |
|
98 OptCSetScannedCards, |
|
99 OptCSetClaimedCards, |
|
100 OptCSetSkippedCards, |
|
101 OptCSetUsedMemory |
|
102 }; |
|
103 |
95 private: |
104 private: |
96 // Markers for grouping the phases in the GCPhases enum above |
105 // Markers for grouping the phases in the GCPhases enum above |
97 static const int GCMainParPhasesLast = GCWorkerEnd; |
106 static const int GCMainParPhasesLast = GCWorkerEnd; |
98 static const int StringDedupPhasesFirst = StringDedupQueueFixup; |
107 static const int StringDedupPhasesFirst = StringDedupQueueFixup; |
99 static const int StringDedupPhasesLast = StringDedupTableFixup; |
108 static const int StringDedupPhasesLast = StringDedupTableFixup; |
106 |
115 |
107 WorkerDataArray<size_t>* _scan_rs_scanned_cards; |
116 WorkerDataArray<size_t>* _scan_rs_scanned_cards; |
108 WorkerDataArray<size_t>* _scan_rs_claimed_cards; |
117 WorkerDataArray<size_t>* _scan_rs_claimed_cards; |
109 WorkerDataArray<size_t>* _scan_rs_skipped_cards; |
118 WorkerDataArray<size_t>* _scan_rs_skipped_cards; |
110 |
119 |
|
120 WorkerDataArray<size_t>* _opt_cset_scanned_cards; |
|
121 WorkerDataArray<size_t>* _opt_cset_claimed_cards; |
|
122 WorkerDataArray<size_t>* _opt_cset_skipped_cards; |
|
123 WorkerDataArray<size_t>* _opt_cset_used_memory; |
|
124 |
111 WorkerDataArray<size_t>* _termination_attempts; |
125 WorkerDataArray<size_t>* _termination_attempts; |
112 |
126 |
113 WorkerDataArray<size_t>* _redirtied_cards; |
127 WorkerDataArray<size_t>* _redirtied_cards; |
114 |
128 |
115 double _cur_collection_par_time_ms; |
129 double _cur_collection_par_time_ms; |
|
130 double _cur_optional_evac_ms; |
116 double _cur_collection_code_root_fixup_time_ms; |
131 double _cur_collection_code_root_fixup_time_ms; |
117 double _cur_strong_code_root_purge_time_ms; |
132 double _cur_strong_code_root_purge_time_ms; |
118 |
133 |
119 double _cur_evac_fail_recalc_used; |
134 double _cur_evac_fail_recalc_used; |
120 double _cur_evac_fail_remove_self_forwards; |
135 double _cur_evac_fail_remove_self_forwards; |
182 void trace_time(const char* name, double value) const; |
197 void trace_time(const char* name, double value) const; |
183 void trace_count(const char* name, size_t value) const; |
198 void trace_count(const char* name, size_t value) const; |
184 |
199 |
185 double print_pre_evacuate_collection_set() const; |
200 double print_pre_evacuate_collection_set() const; |
186 double print_evacuate_collection_set() const; |
201 double print_evacuate_collection_set() const; |
|
202 double print_evacuate_optional_collection_set() const; |
187 double print_post_evacuate_collection_set() const; |
203 double print_post_evacuate_collection_set() const; |
188 void print_other(double accounted_ms) const; |
204 void print_other(double accounted_ms) const; |
189 |
205 |
190 public: |
206 public: |
191 G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads); |
207 G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads); |
197 void record_time_secs(GCParPhases phase, uint worker_i, double secs); |
213 void record_time_secs(GCParPhases phase, uint worker_i, double secs); |
198 |
214 |
199 // add a number of seconds to a phase |
215 // add a number of seconds to a phase |
200 void add_time_secs(GCParPhases phase, uint worker_i, double secs); |
216 void add_time_secs(GCParPhases phase, uint worker_i, double secs); |
201 |
217 |
202 void record_or_add_objcopy_time_secs(uint worker_i, double secs); |
218 void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs); |
203 |
219 |
204 void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0); |
220 void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0); |
|
221 |
|
222 void record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0); |
205 |
223 |
206 // return the average time for a phase in milliseconds |
224 // return the average time for a phase in milliseconds |
207 double average_time_ms(GCParPhases phase); |
225 double average_time_ms(GCParPhases phase); |
208 |
226 |
209 size_t sum_thread_work_items(GCParPhases phase, uint index = 0); |
227 size_t sum_thread_work_items(GCParPhases phase, uint index = 0); |
230 _cur_expand_heap_time_ms = ms; |
248 _cur_expand_heap_time_ms = ms; |
231 } |
249 } |
232 |
250 |
233 void record_par_time(double ms) { |
251 void record_par_time(double ms) { |
234 _cur_collection_par_time_ms = ms; |
252 _cur_collection_par_time_ms = ms; |
|
253 } |
|
254 |
|
255 void record_optional_evacuation(double ms) { |
|
256 _cur_optional_evac_ms = ms; |
235 } |
257 } |
236 |
258 |
237 void record_code_root_fixup_time(double ms) { |
259 void record_code_root_fixup_time(double ms) { |
238 _cur_collection_code_root_fixup_time_ms = ms; |
260 _cur_collection_code_root_fixup_time_ms = ms; |
239 } |
261 } |