Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 3979:4dfb2df418f2
6484982: G1: process references during evacuation pauses
Summary: G1 now uses two reference processors - one is used by concurrent marking and the other is used by STW GCs (both full and incremental evacuation pauses). In an evacuation pause, the reference processor is embedded into the closures used to scan objects. Doing so causes causes reference objects to be 'discovered' by the reference processor. At the end of the evacuation pause, these discovered reference objects are processed - preserving (and copying) referent objects (and their reachable graphs) as appropriate.
Reviewed-by: ysr, jwilhelm, brutisso, stefank, tonyp
author | johnc |
---|---|
date | Thu, 22 Sep 2011 10:57:37 -0700 |
parents | af2ab04e0038 |
children | 8229bd737950 |
comparison
equal
deleted
inserted
replaced
3978:f0ecbe78fc7b | 3979:4dfb2df418f2 |
---|---|
117 size_t _prev_collection_pause_used_at_end_bytes; | 117 size_t _prev_collection_pause_used_at_end_bytes; |
118 double _cur_collection_par_time_ms; | 118 double _cur_collection_par_time_ms; |
119 double _cur_satb_drain_time_ms; | 119 double _cur_satb_drain_time_ms; |
120 double _cur_clear_ct_time_ms; | 120 double _cur_clear_ct_time_ms; |
121 bool _satb_drain_time_set; | 121 bool _satb_drain_time_set; |
122 double _cur_ref_proc_time_ms; | |
123 double _cur_ref_enq_time_ms; | |
122 | 124 |
123 #ifndef PRODUCT | 125 #ifndef PRODUCT |
124 // Card Table Count Cache stats | 126 // Card Table Count Cache stats |
125 double _min_clear_cc_time_ms; // min | 127 double _min_clear_cc_time_ms; // min |
126 double _max_clear_cc_time_ms; // max | 128 double _max_clear_cc_time_ms; // max |
982 void record_aux_end_time(int i) { | 984 void record_aux_end_time(int i) { |
983 guarantee(i < _aux_num, "should be within range"); | 985 guarantee(i < _aux_num, "should be within range"); |
984 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i]; | 986 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i]; |
985 _cur_aux_times_set[i] = true; | 987 _cur_aux_times_set[i] = true; |
986 _cur_aux_times_ms[i] += ms; | 988 _cur_aux_times_ms[i] += ms; |
989 } | |
990 | |
991 void record_ref_proc_time(double ms) { | |
992 _cur_ref_proc_time_ms = ms; | |
993 } | |
994 | |
995 void record_ref_enq_time(double ms) { | |
996 _cur_ref_enq_time_ms = ms; | |
987 } | 997 } |
988 | 998 |
989 #ifndef PRODUCT | 999 #ifndef PRODUCT |
990 void record_cc_clear_time(double ms) { | 1000 void record_cc_clear_time(double ms) { |
991 if (_min_clear_cc_time_ms < 0.0 || ms <= _min_clear_cc_time_ms) | 1001 if (_min_clear_cc_time_ms < 0.0 || ms <= _min_clear_cc_time_ms) |