281
282 // Set up the region size and associated fields. Given that the
283 // policy is created before the heap, we have to set this up here,
284 // so it's done as soon as possible.
285 HeapRegion::setup_heap_region_size(Arguments::min_heap_size());
286 HeapRegionRemSet::setup_remset_size();
287
288 G1ErgoVerbose::initialize();
289 if (PrintAdaptiveSizePolicy) {
290 // Currently, we only use a single switch for all the heuristics.
291 G1ErgoVerbose::set_enabled(true);
292 // Given that we don't currently have a verboseness level
293 // parameter, we'll hardcode this to high. This can be easily
294 // changed in the future.
295 G1ErgoVerbose::set_level(ErgoHigh);
296 } else {
297 G1ErgoVerbose::set_enabled(false);
298 }
299
300 // Verify PLAB sizes
301 const uint region_size = HeapRegion::GrainWords;
302 if (YoungPLABSize > region_size || OldPLABSize > region_size) {
303 char buffer[128];
304 jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most %u",
305 OldPLABSize > region_size ? "Old" : "Young", region_size);
306 vm_exit_during_initialization(buffer);
307 }
308
309 _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
310 _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;
311
312 _par_last_gc_worker_start_times_ms = new double[_parallel_gc_threads];
313 _par_last_ext_root_scan_times_ms = new double[_parallel_gc_threads];
314 _par_last_mark_stack_scan_times_ms = new double[_parallel_gc_threads];
315
316 _par_last_update_rs_times_ms = new double[_parallel_gc_threads];
317 _par_last_update_rs_processed_buffers = new double[_parallel_gc_threads];
318
319 _par_last_scan_rs_times_ms = new double[_parallel_gc_threads];
320
321 _par_last_obj_copy_times_ms = new double[_parallel_gc_threads];
322
323 _par_last_termination_times_ms = new double[_parallel_gc_threads];
324 _par_last_termination_attempts = new double[_parallel_gc_threads];
|
281
282 // Set up the region size and associated fields. Given that the
283 // policy is created before the heap, we have to set this up here,
284 // so it's done as soon as possible.
285 HeapRegion::setup_heap_region_size(Arguments::min_heap_size());
286 HeapRegionRemSet::setup_remset_size();
287
288 G1ErgoVerbose::initialize();
289 if (PrintAdaptiveSizePolicy) {
290 // Currently, we only use a single switch for all the heuristics.
291 G1ErgoVerbose::set_enabled(true);
292 // Given that we don't currently have a verboseness level
293 // parameter, we'll hardcode this to high. This can be easily
294 // changed in the future.
295 G1ErgoVerbose::set_level(ErgoHigh);
296 } else {
297 G1ErgoVerbose::set_enabled(false);
298 }
299
300 // Verify PLAB sizes
301 const size_t region_size = HeapRegion::GrainWords;
302 if (YoungPLABSize > region_size || OldPLABSize > region_size) {
303 char buffer[128];
304 jio_snprintf(buffer, sizeof(buffer), "%sPLABSize should be at most "SIZE_FORMAT,
305 OldPLABSize > region_size ? "Old" : "Young", region_size);
306 vm_exit_during_initialization(buffer);
307 }
308
309 _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
310 _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;
311
312 _par_last_gc_worker_start_times_ms = new double[_parallel_gc_threads];
313 _par_last_ext_root_scan_times_ms = new double[_parallel_gc_threads];
314 _par_last_mark_stack_scan_times_ms = new double[_parallel_gc_threads];
315
316 _par_last_update_rs_times_ms = new double[_parallel_gc_threads];
317 _par_last_update_rs_processed_buffers = new double[_parallel_gc_threads];
318
319 _par_last_scan_rs_times_ms = new double[_parallel_gc_threads];
320
321 _par_last_obj_copy_times_ms = new double[_parallel_gc_threads];
322
323 _par_last_termination_times_ms = new double[_parallel_gc_threads];
324 _par_last_termination_attempts = new double[_parallel_gc_threads];
|