233 void debug_time(const char* name, double value) const;
234 // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
235 void debug_time_for_reference(const char* name, double value) const;
236 void trace_time(const char* name, double value) const;
237 void trace_count(const char* name, size_t value) const;
238
239 double print_pre_evacuate_collection_set() const;
240 double print_merge_heap_roots_time() const;
241 double print_evacuate_initial_collection_set() const;
242 double print_evacuate_optional_collection_set() const;
243 double print_post_evacuate_collection_set() const;
244 void print_other(double accounted_ms) const;
245
246 public:
247 G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
248 void note_gc_start();
249 void print();
250 static const char* phase_name(GCParPhases phase);
251
252 // record the time a phase took in seconds
253 void record_time_secs(GCParPhases phase, uint worker_i, double secs);
254
255 // add a number of seconds to a phase
256 void add_time_secs(GCParPhases phase, uint worker_i, double secs);
257
258 void record_or_add_time_secs(GCParPhases phase, uint worker_i, double secs);
259
260 double get_time_secs(GCParPhases phase, uint worker_i);
261
262 void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
263
264 void record_or_add_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
265
266 size_t get_thread_work_item(GCParPhases phase, uint worker_i, uint index = 0);
267
268 // return the average time for a phase in milliseconds
269 double average_time_ms(GCParPhases phase);
270
271 size_t sum_thread_work_items(GCParPhases phase, uint index = 0);
272
273 public:
274
275 void record_prepare_tlab_time_ms(double ms) {
276 _cur_prepare_tlab_time_ms = ms;
277 }
278
279 void record_resize_tlab_time_ms(double ms) {
280 _cur_resize_tlab_time_ms = ms;
281 }
282
283 void record_derived_pointer_table_update_time(double ms) {
284 _cur_derived_pointer_table_update_time_ms = ms;
285 }
286
|
233 void debug_time(const char* name, double value) const;
234 // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
235 void debug_time_for_reference(const char* name, double value) const;
236 void trace_time(const char* name, double value) const;
237 void trace_count(const char* name, size_t value) const;
238
239 double print_pre_evacuate_collection_set() const;
240 double print_merge_heap_roots_time() const;
241 double print_evacuate_initial_collection_set() const;
242 double print_evacuate_optional_collection_set() const;
243 double print_post_evacuate_collection_set() const;
244 void print_other(double accounted_ms) const;
245
246 public:
247 G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
248 void note_gc_start();
249 void print();
250 static const char* phase_name(GCParPhases phase);
251
252 // record the time a phase took in seconds
253 void record_time_secs(GCParPhases phase, uint worker_id, double secs);
254
255 // add a number of seconds to a phase
256 void add_time_secs(GCParPhases phase, uint worker_id, double secs);
257
258 void record_or_add_time_secs(GCParPhases phase, uint worker_id, double secs);
259
260 double get_time_secs(GCParPhases phase, uint worker_id);
261
262 void record_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
263
264 void record_or_add_thread_work_item(GCParPhases phase, uint worker_id, size_t count, uint index = 0);
265
266 size_t get_thread_work_item(GCParPhases phase, uint worker_id, uint index = 0);
267
268 // return the average time for a phase in milliseconds
269 double average_time_ms(GCParPhases phase);
270
271 size_t sum_thread_work_items(GCParPhases phase, uint index = 0);
272
273 public:
274
275 void record_prepare_tlab_time_ms(double ms) {
276 _cur_prepare_tlab_time_ms = ms;
277 }
278
279 void record_resize_tlab_time_ms(double ms) {
280 _cur_resize_tlab_time_ms = ms;
281 }
282
283 void record_derived_pointer_table_update_time(double ms) {
284 _cur_derived_pointer_table_update_time_ms = ms;
285 }
286
|