102
103 void initialize_all() {
104 initialize_flags();
105 initialize_size_info();
106 initialize_perm_generation(PermGen::MarkSweepCompact);
107 }
108
109 virtual size_t default_init_heap_size() {
110 // Pick some reasonable default.
111 return 8*M;
112 }
113
114 double _cur_collection_start_sec;
115 size_t _cur_collection_pause_used_at_start_bytes;
116 size_t _cur_collection_pause_used_regions_at_start;
117 size_t _prev_collection_pause_used_at_end_bytes;
118 double _cur_collection_par_time_ms;
119 double _cur_satb_drain_time_ms;
120 double _cur_clear_ct_time_ms;
121 bool _satb_drain_time_set;
122
123 #ifndef PRODUCT
124 // Card Table Count Cache stats
125 double _min_clear_cc_time_ms; // min
126 double _max_clear_cc_time_ms; // max
127 double _cur_clear_cc_time_ms; // clearing time during current pause
128 double _cum_clear_cc_time_ms; // cummulative clearing time
129 jlong _num_cc_clears; // number of times the card count cache has been cleared
130 #endif
131
132 // Statistics for recent GC pauses. See below for how indexed.
133 TruncatedSeq* _recent_rs_scan_times_ms;
134
135 // These exclude marking times.
136 TruncatedSeq* _recent_pause_times_ms;
137 TruncatedSeq* _recent_gc_times_ms;
138
139 TruncatedSeq* _recent_CS_bytes_used_before;
140 TruncatedSeq* _recent_CS_bytes_surviving;
141
969 void record_clear_ct_time(double ms) {
970 _cur_clear_ct_time_ms = ms;
971 }
972
973 void record_par_time(double ms) {
974 _cur_collection_par_time_ms = ms;
975 }
976
977 void record_aux_start_time(int i) {
978 guarantee(i < _aux_num, "should be within range");
979 _cur_aux_start_times_ms[i] = os::elapsedTime() * 1000.0;
980 }
981
982 void record_aux_end_time(int i) {
983 guarantee(i < _aux_num, "should be within range");
984 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i];
985 _cur_aux_times_set[i] = true;
986 _cur_aux_times_ms[i] += ms;
987 }
988
989 #ifndef PRODUCT
990 void record_cc_clear_time(double ms) {
991 if (_min_clear_cc_time_ms < 0.0 || ms <= _min_clear_cc_time_ms)
992 _min_clear_cc_time_ms = ms;
993 if (_max_clear_cc_time_ms < 0.0 || ms >= _max_clear_cc_time_ms)
994 _max_clear_cc_time_ms = ms;
995 _cur_clear_cc_time_ms = ms;
996 _cum_clear_cc_time_ms += ms;
997 _num_cc_clears++;
998 }
999 #endif
1000
1001 // Record how much space we copied during a GC. This is typically
1002 // called when a GC alloc region is being retired.
1003 void record_bytes_copied_during_gc(size_t bytes) {
1004 _bytes_copied_during_gc += bytes;
1005 }
1006
1007 // The amount of space we copied during a GC.
1008 size_t bytes_copied_during_gc() {
|
102
103 void initialize_all() {
104 initialize_flags();
105 initialize_size_info();
106 initialize_perm_generation(PermGen::MarkSweepCompact);
107 }
108
109 virtual size_t default_init_heap_size() {
110 // Pick some reasonable default.
111 return 8*M;
112 }
113
114 double _cur_collection_start_sec;
115 size_t _cur_collection_pause_used_at_start_bytes;
116 size_t _cur_collection_pause_used_regions_at_start;
117 size_t _prev_collection_pause_used_at_end_bytes;
118 double _cur_collection_par_time_ms;
119 double _cur_satb_drain_time_ms;
120 double _cur_clear_ct_time_ms;
121 bool _satb_drain_time_set;
122 double _cur_ref_proc_time_ms;
123 double _cur_ref_enq_time_ms;
124
125 #ifndef PRODUCT
126 // Card Table Count Cache stats
127 double _min_clear_cc_time_ms; // min
128 double _max_clear_cc_time_ms; // max
129 double _cur_clear_cc_time_ms; // clearing time during current pause
130 double _cum_clear_cc_time_ms; // cummulative clearing time
131 jlong _num_cc_clears; // number of times the card count cache has been cleared
132 #endif
133
134 // Statistics for recent GC pauses. See below for how indexed.
135 TruncatedSeq* _recent_rs_scan_times_ms;
136
137 // These exclude marking times.
138 TruncatedSeq* _recent_pause_times_ms;
139 TruncatedSeq* _recent_gc_times_ms;
140
141 TruncatedSeq* _recent_CS_bytes_used_before;
142 TruncatedSeq* _recent_CS_bytes_surviving;
143
971 void record_clear_ct_time(double ms) {
972 _cur_clear_ct_time_ms = ms;
973 }
974
975 void record_par_time(double ms) {
976 _cur_collection_par_time_ms = ms;
977 }
978
979 void record_aux_start_time(int i) {
980 guarantee(i < _aux_num, "should be within range");
981 _cur_aux_start_times_ms[i] = os::elapsedTime() * 1000.0;
982 }
983
984 void record_aux_end_time(int i) {
985 guarantee(i < _aux_num, "should be within range");
986 double ms = os::elapsedTime() * 1000.0 - _cur_aux_start_times_ms[i];
987 _cur_aux_times_set[i] = true;
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;
997 }
998
999 #ifndef PRODUCT
1000 void record_cc_clear_time(double ms) {
1001 if (_min_clear_cc_time_ms < 0.0 || ms <= _min_clear_cc_time_ms)
1002 _min_clear_cc_time_ms = ms;
1003 if (_max_clear_cc_time_ms < 0.0 || ms >= _max_clear_cc_time_ms)
1004 _max_clear_cc_time_ms = ms;
1005 _cur_clear_cc_time_ms = ms;
1006 _cum_clear_cc_time_ms += ms;
1007 _num_cc_clears++;
1008 }
1009 #endif
1010
1011 // Record how much space we copied during a GC. This is typically
1012 // called when a GC alloc region is being retired.
1013 void record_bytes_copied_during_gc(size_t bytes) {
1014 _bytes_copied_during_gc += bytes;
1015 }
1016
1017 // The amount of space we copied during a GC.
1018 size_t bytes_copied_during_gc() {
|