326 _num_regions, pretouch_bitmap_page_size);
327 ShenandoahPretouchBitmapTask bcl(bitmap.base(), _bitmap_size, pretouch_bitmap_page_size);
328 _workers->run_task(&bcl);
329
330 log_info(gc, init)("Pretouch heap: " SIZE_FORMAT " regions, " SIZE_FORMAT " bytes page",
331 _num_regions, pretouch_heap_page_size);
332 ShenandoahPretouchHeapTask hcl(pretouch_heap_page_size);
333 _workers->run_task(&hcl);
334 }
335
336 //
337 // Initialize the rest of GC subsystems
338 //
339
340 _liveness_cache = NEW_C_HEAP_ARRAY(jushort*, _max_workers, mtGC);
341 for (uint worker = 0; worker < _max_workers; worker++) {
342 _liveness_cache[worker] = NEW_C_HEAP_ARRAY(jushort, _num_regions, mtGC);
343 Copy::fill_to_bytes(_liveness_cache[worker], _num_regions * sizeof(jushort));
344 }
345
346 // The call below uses stuff (the SATB* things) that are in G1, but probably
347 // belong into a shared location.
348 ShenandoahBarrierSet::satb_mark_queue_set().initialize(this,
349 20 /* G1SATBProcessCompletedThreshold */,
350 60 /* G1SATBBufferEnqueueingThresholdPercent */);
351
352 _monitoring_support = new ShenandoahMonitoringSupport(this);
353 _phase_timings = new ShenandoahPhaseTimings();
354 ShenandoahStringDedup::initialize();
355 ShenandoahCodeRoots::initialize();
356
357 if (ShenandoahAllocationTrace) {
358 _alloc_tracker = new ShenandoahAllocTracker();
359 }
360
361 if (ShenandoahPacing) {
362 _pacer = new ShenandoahPacer(this);
363 _pacer->setup_for_idle();
364 } else {
365 _pacer = NULL;
366 }
367
368 _traversal_gc = strcmp(ShenandoahGCMode, "traversal") == 0 ?
369 new ShenandoahTraversalGC(this, _num_regions) :
370 NULL;
|
326 _num_regions, pretouch_bitmap_page_size);
327 ShenandoahPretouchBitmapTask bcl(bitmap.base(), _bitmap_size, pretouch_bitmap_page_size);
328 _workers->run_task(&bcl);
329
330 log_info(gc, init)("Pretouch heap: " SIZE_FORMAT " regions, " SIZE_FORMAT " bytes page",
331 _num_regions, pretouch_heap_page_size);
332 ShenandoahPretouchHeapTask hcl(pretouch_heap_page_size);
333 _workers->run_task(&hcl);
334 }
335
336 //
337 // Initialize the rest of GC subsystems
338 //
339
340 _liveness_cache = NEW_C_HEAP_ARRAY(jushort*, _max_workers, mtGC);
341 for (uint worker = 0; worker < _max_workers; worker++) {
342 _liveness_cache[worker] = NEW_C_HEAP_ARRAY(jushort, _num_regions, mtGC);
343 Copy::fill_to_bytes(_liveness_cache[worker], _num_regions * sizeof(jushort));
344 }
345
346 // There should probably be Shenandoah-specific options for these,
347 // just as there are G1-specific options.
348 {
349 ShenandoahSATBMarkQueueSet& satbqs = ShenandoahBarrierSet::satb_mark_queue_set();
350 satbqs.set_process_completed_buffers_threshold(20); // G1SATBProcessCompletedThreshold
351 satbqs.set_buffer_enqueue_threshold_percentage(60); // G1SATBBufferEnqueueingThresholdPercent
352 }
353
354 _monitoring_support = new ShenandoahMonitoringSupport(this);
355 _phase_timings = new ShenandoahPhaseTimings();
356 ShenandoahStringDedup::initialize();
357 ShenandoahCodeRoots::initialize();
358
359 if (ShenandoahAllocationTrace) {
360 _alloc_tracker = new ShenandoahAllocTracker();
361 }
362
363 if (ShenandoahPacing) {
364 _pacer = new ShenandoahPacer(this);
365 _pacer->setup_for_idle();
366 } else {
367 _pacer = NULL;
368 }
369
370 _traversal_gc = strcmp(ShenandoahGCMode, "traversal") == 0 ?
371 new ShenandoahTraversalGC(this, _num_regions) :
372 NULL;
|