330
331 log_info(gc, init)("Pretouch heap: " SIZE_FORMAT " regions, " SIZE_FORMAT " bytes page",
332 _num_regions, pretouch_heap_page_size);
333 ShenandoahPretouchHeapTask hcl(pretouch_heap_page_size);
334 _workers->run_task(&hcl);
335 }
336
337 //
338 // Initialize the rest of GC subsystems
339 //
340
341 _liveness_cache = NEW_C_HEAP_ARRAY(jushort*, _max_workers, mtGC);
342 for (uint worker = 0; worker < _max_workers; worker++) {
343 _liveness_cache[worker] = NEW_C_HEAP_ARRAY(jushort, _num_regions, mtGC);
344 Copy::fill_to_bytes(_liveness_cache[worker], _num_regions * sizeof(jushort));
345 }
346
347 // The call below uses stuff (the SATB* things) that are in G1, but probably
348 // belong into a shared location.
349 ShenandoahBarrierSet::satb_mark_queue_set().initialize(this,
350 SATB_Q_CBL_mon,
351 20 /* G1SATBProcessCompletedThreshold */,
352 60 /* G1SATBBufferEnqueueingThresholdPercent */);
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 = heuristics()->can_do_traversal_gc() ?
|
330
331 log_info(gc, init)("Pretouch heap: " SIZE_FORMAT " regions, " SIZE_FORMAT " bytes page",
332 _num_regions, pretouch_heap_page_size);
333 ShenandoahPretouchHeapTask hcl(pretouch_heap_page_size);
334 _workers->run_task(&hcl);
335 }
336
337 //
338 // Initialize the rest of GC subsystems
339 //
340
341 _liveness_cache = NEW_C_HEAP_ARRAY(jushort*, _max_workers, mtGC);
342 for (uint worker = 0; worker < _max_workers; worker++) {
343 _liveness_cache[worker] = NEW_C_HEAP_ARRAY(jushort, _num_regions, mtGC);
344 Copy::fill_to_bytes(_liveness_cache[worker], _num_regions * sizeof(jushort));
345 }
346
347 // The call below uses stuff (the SATB* things) that are in G1, but probably
348 // belong into a shared location.
349 ShenandoahBarrierSet::satb_mark_queue_set().initialize(this,
350 20 /* G1SATBProcessCompletedThreshold */,
351 60 /* G1SATBBufferEnqueueingThresholdPercent */);
352
353 _monitoring_support = new ShenandoahMonitoringSupport(this);
354 _phase_timings = new ShenandoahPhaseTimings();
355 ShenandoahStringDedup::initialize();
356 ShenandoahCodeRoots::initialize();
357
358 if (ShenandoahAllocationTrace) {
359 _alloc_tracker = new ShenandoahAllocTracker();
360 }
361
362 if (ShenandoahPacing) {
363 _pacer = new ShenandoahPacer(this);
364 _pacer->setup_for_idle();
365 } else {
366 _pacer = NULL;
367 }
368
369 _traversal_gc = heuristics()->can_do_traversal_gc() ?
|