comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 890:6cb8e9df7174

6819077: G1: first GC thread coming late into the GC. Summary: The first worker thread is delayed when entering the GC because it clears the card count table that is used in identifying hot cards. Replace the card count table with a dynamically sized evicting hash table that includes an epoch based counter. Reviewed-by: iveresov, tonyp
author johnc
date Tue, 04 Aug 2009 16:00:17 -0700
parents 0316eac49d5a
children e1fdf4fd34dc
comparison
equal deleted inserted replaced
889:15c5903cf9e1 890:6cb8e9df7174
110 virtual size_t default_init_heap_size() { 110 virtual size_t default_init_heap_size() {
111 // Pick some reasonable default. 111 // Pick some reasonable default.
112 return 8*M; 112 return 8*M;
113 } 113 }
114 114
115
116 double _cur_collection_start_sec; 115 double _cur_collection_start_sec;
117 size_t _cur_collection_pause_used_at_start_bytes; 116 size_t _cur_collection_pause_used_at_start_bytes;
118 size_t _cur_collection_pause_used_regions_at_start; 117 size_t _cur_collection_pause_used_regions_at_start;
119 size_t _prev_collection_pause_used_at_end_bytes; 118 size_t _prev_collection_pause_used_at_end_bytes;
120 double _cur_collection_par_time_ms; 119 double _cur_collection_par_time_ms;
121 double _cur_satb_drain_time_ms; 120 double _cur_satb_drain_time_ms;
122 double _cur_clear_ct_time_ms; 121 double _cur_clear_ct_time_ms;
123 bool _satb_drain_time_set; 122 bool _satb_drain_time_set;
123
124 #ifndef PRODUCT
125 // Card Table Count Cache stats
126 double _min_clear_cc_time_ms; // min
127 double _max_clear_cc_time_ms; // max
128 double _cur_clear_cc_time_ms; // clearing time during current pause
129 double _cum_clear_cc_time_ms; // cummulative clearing time
130 jlong _num_cc_clears; // number of times the card count cache has been cleared
131 #endif
124 132
125 double _cur_CH_strong_roots_end_sec; 133 double _cur_CH_strong_roots_end_sec;
126 double _cur_CH_strong_roots_dur_ms; 134 double _cur_CH_strong_roots_dur_ms;
127 double _cur_G1_strong_roots_end_sec; 135 double _cur_G1_strong_roots_end_sec;
128 double _cur_G1_strong_roots_dur_ms; 136 double _cur_G1_strong_roots_dur_ms;
928 guarantee(i < _aux_num, "should be within range"); 936 guarantee(i < _aux_num, "should be within range");
929 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i]; 937 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i];
930 _cur_aux_times_set[i] = true; 938 _cur_aux_times_set[i] = true;
931 _cur_aux_times_ms[i] += ms; 939 _cur_aux_times_ms[i] += ms;
932 } 940 }
941
942 #ifndef PRODUCT
943 void record_cc_clear_time(double ms) {
944 if (_min_clear_cc_time_ms < 0.0 || ms <= _min_clear_cc_time_ms)
945 _min_clear_cc_time_ms = ms;
946 if (_max_clear_cc_time_ms < 0.0 || ms >= _max_clear_cc_time_ms)
947 _max_clear_cc_time_ms = ms;
948 _cur_clear_cc_time_ms = ms;
949 _cum_clear_cc_time_ms += ms;
950 _num_cc_clears++;
951 }
952 #endif
933 953
934 // Record the fact that "bytes" bytes allocated in a region. 954 // Record the fact that "bytes" bytes allocated in a region.
935 void record_before_bytes(size_t bytes); 955 void record_before_bytes(size_t bytes);
936 void record_after_bytes(size_t bytes); 956 void record_after_bytes(size_t bytes);
937 957