1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
114 uint _max_gc_threads;
115
116 WorkerDataArray<double> _last_gc_worker_start_times_ms;
117 WorkerDataArray<double> _last_ext_root_scan_times_ms;
118 WorkerDataArray<double> _last_satb_filtering_times_ms;
119 WorkerDataArray<double> _last_update_rs_times_ms;
120 WorkerDataArray<int> _last_update_rs_processed_buffers;
121 WorkerDataArray<double> _last_scan_rs_times_ms;
122 WorkerDataArray<double> _last_strong_code_root_scan_times_ms;
123 WorkerDataArray<double> _last_strong_code_root_mark_times_ms;
124 WorkerDataArray<double> _last_obj_copy_times_ms;
125 WorkerDataArray<double> _last_termination_times_ms;
126 WorkerDataArray<size_t> _last_termination_attempts;
127 WorkerDataArray<double> _last_gc_worker_end_times_ms;
128 WorkerDataArray<double> _last_gc_worker_times_ms;
129 WorkerDataArray<double> _last_gc_worker_other_times_ms;
130
131 double _cur_collection_par_time_ms;
132 double _cur_collection_code_root_fixup_time_ms;
133 double _cur_strong_code_root_migration_time_ms;
134
135 double _cur_clear_ct_time_ms;
136 double _cur_ref_proc_time_ms;
137 double _cur_ref_enq_time_ms;
138
139 double _cur_collection_start_sec;
140 double _root_region_scan_wait_time_ms;
141
142 double _recorded_young_cset_choice_time_ms;
143 double _recorded_non_young_cset_choice_time_ms;
144
145 double _recorded_young_free_cset_time_ms;
146 double _recorded_non_young_free_cset_time_ms;
147
148 double _cur_verify_before_time_ms;
149 double _cur_verify_after_time_ms;
150
151 // Helper methods for detailed logging
152 void print_stats(int level, const char* str, double value);
153 void print_stats(int level, const char* str, double value, int workers);
204 }
205
206 void record_gc_worker_end_time(uint worker_i, double ms) {
207 _last_gc_worker_end_times_ms.set(worker_i, ms);
208 }
209
210 void record_clear_ct_time(double ms) {
211 _cur_clear_ct_time_ms = ms;
212 }
213
214 void record_par_time(double ms) {
215 _cur_collection_par_time_ms = ms;
216 }
217
218 void record_code_root_fixup_time(double ms) {
219 _cur_collection_code_root_fixup_time_ms = ms;
220 }
221
222 void record_strong_code_root_migration_time(double ms) {
223 _cur_strong_code_root_migration_time_ms = ms;
224 }
225
226 void record_ref_proc_time(double ms) {
227 _cur_ref_proc_time_ms = ms;
228 }
229
230 void record_ref_enq_time(double ms) {
231 _cur_ref_enq_time_ms = ms;
232 }
233
234 void record_root_region_scan_wait_time(double time_ms) {
235 _root_region_scan_wait_time_ms = time_ms;
236 }
237
238 void record_young_free_cset_time_ms(double time_ms) {
239 _recorded_young_free_cset_time_ms = time_ms;
240 }
241
242 void record_non_young_free_cset_time_ms(double time_ms) {
243 _recorded_non_young_free_cset_time_ms = time_ms;
|
1 /*
2 * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
114 uint _max_gc_threads;
115
116 WorkerDataArray<double> _last_gc_worker_start_times_ms;
117 WorkerDataArray<double> _last_ext_root_scan_times_ms;
118 WorkerDataArray<double> _last_satb_filtering_times_ms;
119 WorkerDataArray<double> _last_update_rs_times_ms;
120 WorkerDataArray<int> _last_update_rs_processed_buffers;
121 WorkerDataArray<double> _last_scan_rs_times_ms;
122 WorkerDataArray<double> _last_strong_code_root_scan_times_ms;
123 WorkerDataArray<double> _last_strong_code_root_mark_times_ms;
124 WorkerDataArray<double> _last_obj_copy_times_ms;
125 WorkerDataArray<double> _last_termination_times_ms;
126 WorkerDataArray<size_t> _last_termination_attempts;
127 WorkerDataArray<double> _last_gc_worker_end_times_ms;
128 WorkerDataArray<double> _last_gc_worker_times_ms;
129 WorkerDataArray<double> _last_gc_worker_other_times_ms;
130
131 double _cur_collection_par_time_ms;
132 double _cur_collection_code_root_fixup_time_ms;
133 double _cur_strong_code_root_migration_time_ms;
134 double _cur_strong_code_root_purge_time_ms;
135
136 double _cur_clear_ct_time_ms;
137 double _cur_ref_proc_time_ms;
138 double _cur_ref_enq_time_ms;
139
140 double _cur_collection_start_sec;
141 double _root_region_scan_wait_time_ms;
142
143 double _recorded_young_cset_choice_time_ms;
144 double _recorded_non_young_cset_choice_time_ms;
145
146 double _recorded_young_free_cset_time_ms;
147 double _recorded_non_young_free_cset_time_ms;
148
149 double _cur_verify_before_time_ms;
150 double _cur_verify_after_time_ms;
151
152 // Helper methods for detailed logging
153 void print_stats(int level, const char* str, double value);
154 void print_stats(int level, const char* str, double value, int workers);
205 }
206
207 void record_gc_worker_end_time(uint worker_i, double ms) {
208 _last_gc_worker_end_times_ms.set(worker_i, ms);
209 }
210
211 void record_clear_ct_time(double ms) {
212 _cur_clear_ct_time_ms = ms;
213 }
214
215 void record_par_time(double ms) {
216 _cur_collection_par_time_ms = ms;
217 }
218
219 void record_code_root_fixup_time(double ms) {
220 _cur_collection_code_root_fixup_time_ms = ms;
221 }
222
223 void record_strong_code_root_migration_time(double ms) {
224 _cur_strong_code_root_migration_time_ms = ms;
225 }
226
227 void record_strong_code_root_purge_time(double ms) {
228 _cur_strong_code_root_purge_time_ms = ms;
229 }
230
231 void record_ref_proc_time(double ms) {
232 _cur_ref_proc_time_ms = ms;
233 }
234
235 void record_ref_enq_time(double ms) {
236 _cur_ref_enq_time_ms = ms;
237 }
238
239 void record_root_region_scan_wait_time(double time_ms) {
240 _root_region_scan_wait_time_ms = time_ms;
241 }
242
243 void record_young_free_cset_time_ms(double time_ms) {
244 _recorded_young_free_cset_time_ms = time_ms;
245 }
246
247 void record_non_young_free_cset_time_ms(double time_ms) {
248 _recorded_non_young_free_cset_time_ms = time_ms;
|