Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 4023:c6a6e936dc68
7096030: G1: PrintGCDetails enhancements
7102445: G1: Unnecessary Resource allocations during RSet scanning
Summary: Add a new per-worker thread line in the PrintGCDetails output. GC Worker Other is the difference between the elapsed time for the parallel phase of the evacuation pause and the sum of the times of the sub-phases (external root scanning, mark stack scanning, RSet updating, RSet scanning, object copying, and termination) for that worker. During RSet scanning, stack allocate DirtyCardToOopClosure objects; allocating these in a resource area was causing abnormally high GC Worker Other times while the worker thread freed ResourceArea chunks.
Reviewed-by: tonyp, jwilhelm, brutisso
author | johnc |
---|---|
date | Sun, 23 Oct 2011 23:06:06 -0700 |
parents | 074f0252cc13 |
children | a88de71c4e3a |
comparison
equal
deleted
inserted
replaced
4022:db89aa49298f | 4023:c6a6e936dc68 |
---|---|
72 define_num_seq(scan_rs) | 72 define_num_seq(scan_rs) |
73 define_num_seq(obj_copy) | 73 define_num_seq(obj_copy) |
74 define_num_seq(termination) // parallel only | 74 define_num_seq(termination) // parallel only |
75 define_num_seq(parallel_other) // parallel only | 75 define_num_seq(parallel_other) // parallel only |
76 define_num_seq(mark_closure) | 76 define_num_seq(mark_closure) |
77 define_num_seq(clear_ct) // parallel only | 77 define_num_seq(clear_ct) |
78 }; | 78 }; |
79 | 79 |
80 class Summary: public PauseSummary, | 80 class Summary: public PauseSummary, |
81 public MainBodySummary { | 81 public MainBodySummary { |
82 public: | 82 public: |
113 size_t _cur_collection_pause_used_regions_at_start; | 113 size_t _cur_collection_pause_used_regions_at_start; |
114 size_t _prev_collection_pause_used_at_end_bytes; | 114 size_t _prev_collection_pause_used_at_end_bytes; |
115 double _cur_collection_par_time_ms; | 115 double _cur_collection_par_time_ms; |
116 double _cur_satb_drain_time_ms; | 116 double _cur_satb_drain_time_ms; |
117 double _cur_clear_ct_time_ms; | 117 double _cur_clear_ct_time_ms; |
118 bool _satb_drain_time_set; | |
119 double _cur_ref_proc_time_ms; | 118 double _cur_ref_proc_time_ms; |
120 double _cur_ref_enq_time_ms; | 119 double _cur_ref_enq_time_ms; |
121 | 120 |
122 #ifndef PRODUCT | 121 #ifndef PRODUCT |
123 // Card Table Count Cache stats | 122 // Card Table Count Cache stats |
173 double* _par_last_obj_copy_times_ms; | 172 double* _par_last_obj_copy_times_ms; |
174 double* _par_last_termination_times_ms; | 173 double* _par_last_termination_times_ms; |
175 double* _par_last_termination_attempts; | 174 double* _par_last_termination_attempts; |
176 double* _par_last_gc_worker_end_times_ms; | 175 double* _par_last_gc_worker_end_times_ms; |
177 double* _par_last_gc_worker_times_ms; | 176 double* _par_last_gc_worker_times_ms; |
177 | |
178 // Each workers 'other' time i.e. the elapsed time of the parallel | |
179 // phase of the pause minus the sum of the individual sub-phase | |
180 // times for a given worker thread. | |
181 double* _par_last_gc_worker_other_times_ms; | |
178 | 182 |
179 // indicates whether we are in full young or partially young GC mode | 183 // indicates whether we are in full young or partially young GC mode |
180 bool _full_young_gcs; | 184 bool _full_young_gcs; |
181 | 185 |
182 // if true, then it tries to dynamically adjust the length of the | 186 // if true, then it tries to dynamically adjust the length of the |
890 void record_mark_stack_scan_time(int worker_i, double ms) { | 894 void record_mark_stack_scan_time(int worker_i, double ms) { |
891 _par_last_mark_stack_scan_times_ms[worker_i] = ms; | 895 _par_last_mark_stack_scan_times_ms[worker_i] = ms; |
892 } | 896 } |
893 | 897 |
894 void record_satb_drain_time(double ms) { | 898 void record_satb_drain_time(double ms) { |
899 assert(_g1->mark_in_progress(), "shouldn't be here otherwise"); | |
895 _cur_satb_drain_time_ms = ms; | 900 _cur_satb_drain_time_ms = ms; |
896 _satb_drain_time_set = true; | 901 } |
897 } | 902 |
898 | 903 void record_satb_drain_processed_buffers(int processed_buffers) { |
899 void record_satb_drain_processed_buffers (int processed_buffers) { | 904 assert(_g1->mark_in_progress(), "shouldn't be here otherwise"); |
900 _last_satb_drain_processed_buffers = processed_buffers; | 905 _last_satb_drain_processed_buffers = processed_buffers; |
901 } | 906 } |
902 | 907 |
903 void record_mod_union_time(double ms) { | 908 void record_mod_union_time(double ms) { |
904 _all_mod_union_times_ms->add(ms); | 909 _all_mod_union_times_ms->add(ms); |