29 #include "gc/shared/gcArguments.hpp"
30 #include "gc/shared/gcTimer.hpp"
31 #include "gc/shared/gcTraceTime.inline.hpp"
32 #include "gc/shared/locationPrinter.inline.hpp"
33 #include "gc/shared/memAllocator.hpp"
34 #include "gc/shared/oopStorageSet.hpp"
35 #include "gc/shared/plab.hpp"
36
37 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
38 #include "gc/shenandoah/shenandoahClosures.inline.hpp"
39 #include "gc/shenandoah/shenandoahCollectionSet.hpp"
40 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
41 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
42 #include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
43 #include "gc/shenandoah/shenandoahControlThread.hpp"
44 #include "gc/shenandoah/shenandoahFreeSet.hpp"
45 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
46 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
47 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
48 #include "gc/shenandoah/shenandoahHeapRegionSet.hpp"
49 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
50 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
51 #include "gc/shenandoah/shenandoahMemoryPool.hpp"
52 #include "gc/shenandoah/shenandoahMetrics.hpp"
53 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
54 #include "gc/shenandoah/shenandoahNormalMode.hpp"
55 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"
56 #include "gc/shenandoah/shenandoahPacer.inline.hpp"
57 #include "gc/shenandoah/shenandoahPadding.hpp"
58 #include "gc/shenandoah/shenandoahParallelCleaning.inline.hpp"
59 #include "gc/shenandoah/shenandoahPassiveMode.hpp"
60 #include "gc/shenandoah/shenandoahRootProcessor.inline.hpp"
61 #include "gc/shenandoah/shenandoahStringDedup.hpp"
62 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
63 #include "gc/shenandoah/shenandoahUtils.hpp"
64 #include "gc/shenandoah/shenandoahVerifier.hpp"
65 #include "gc/shenandoah/shenandoahCodeRoots.hpp"
66 #include "gc/shenandoah/shenandoahVMOperations.hpp"
67 #include "gc/shenandoah/shenandoahWorkGroup.hpp"
68 #include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
380 _pacer = NULL;
381 }
382
383 _control_thread = new ShenandoahControlThread();
384
385 log_info(gc, init)("Initialize Shenandoah heap: " SIZE_FORMAT "%s initial, " SIZE_FORMAT "%s min, " SIZE_FORMAT "%s max",
386 byte_size_in_proper_unit(_initial_size), proper_unit_for_byte_size(_initial_size),
387 byte_size_in_proper_unit(_minimum_size), proper_unit_for_byte_size(_minimum_size),
388 byte_size_in_proper_unit(max_capacity()), proper_unit_for_byte_size(max_capacity())
389 );
390
391 log_info(gc, init)("Safepointing mechanism: thread-local poll");
392
393 return JNI_OK;
394 }
395
396 void ShenandoahHeap::initialize_heuristics() {
397 if (ShenandoahGCMode != NULL) {
398 if (strcmp(ShenandoahGCMode, "normal") == 0) {
399 _gc_mode = new ShenandoahNormalMode();
400 } else if (strcmp(ShenandoahGCMode, "passive") == 0) {
401 _gc_mode = new ShenandoahPassiveMode();
402 } else {
403 vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option");
404 }
405 } else {
406 ShouldNotReachHere();
407 }
408 _gc_mode->initialize_flags();
409 if (_gc_mode->is_diagnostic() && !UnlockDiagnosticVMOptions) {
410 vm_exit_during_initialization(
411 err_msg("GC mode \"%s\" is diagnostic, and must be enabled via -XX:+UnlockDiagnosticVMOptions.",
412 _gc_mode->name()));
413 }
414 if (_gc_mode->is_experimental() && !UnlockExperimentalVMOptions) {
415 vm_exit_during_initialization(
416 err_msg("GC mode \"%s\" is experimental, and must be enabled via -XX:+UnlockExperimentalVMOptions.",
417 _gc_mode->name()));
418 }
419 log_info(gc, init)("Shenandoah GC mode: %s",
|
29 #include "gc/shared/gcArguments.hpp"
30 #include "gc/shared/gcTimer.hpp"
31 #include "gc/shared/gcTraceTime.inline.hpp"
32 #include "gc/shared/locationPrinter.inline.hpp"
33 #include "gc/shared/memAllocator.hpp"
34 #include "gc/shared/oopStorageSet.hpp"
35 #include "gc/shared/plab.hpp"
36
37 #include "gc/shenandoah/shenandoahBarrierSet.hpp"
38 #include "gc/shenandoah/shenandoahClosures.inline.hpp"
39 #include "gc/shenandoah/shenandoahCollectionSet.hpp"
40 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
41 #include "gc/shenandoah/shenandoahConcurrentMark.inline.hpp"
42 #include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
43 #include "gc/shenandoah/shenandoahControlThread.hpp"
44 #include "gc/shenandoah/shenandoahFreeSet.hpp"
45 #include "gc/shenandoah/shenandoahPhaseTimings.hpp"
46 #include "gc/shenandoah/shenandoahHeap.inline.hpp"
47 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
48 #include "gc/shenandoah/shenandoahHeapRegionSet.hpp"
49 #include "gc/shenandoah/shenandoahIUMode.hpp"
50 #include "gc/shenandoah/shenandoahMarkCompact.hpp"
51 #include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
52 #include "gc/shenandoah/shenandoahMemoryPool.hpp"
53 #include "gc/shenandoah/shenandoahMetrics.hpp"
54 #include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
55 #include "gc/shenandoah/shenandoahNormalMode.hpp"
56 #include "gc/shenandoah/shenandoahOopClosures.inline.hpp"
57 #include "gc/shenandoah/shenandoahPacer.inline.hpp"
58 #include "gc/shenandoah/shenandoahPadding.hpp"
59 #include "gc/shenandoah/shenandoahParallelCleaning.inline.hpp"
60 #include "gc/shenandoah/shenandoahPassiveMode.hpp"
61 #include "gc/shenandoah/shenandoahRootProcessor.inline.hpp"
62 #include "gc/shenandoah/shenandoahStringDedup.hpp"
63 #include "gc/shenandoah/shenandoahTaskqueue.hpp"
64 #include "gc/shenandoah/shenandoahUtils.hpp"
65 #include "gc/shenandoah/shenandoahVerifier.hpp"
66 #include "gc/shenandoah/shenandoahCodeRoots.hpp"
67 #include "gc/shenandoah/shenandoahVMOperations.hpp"
68 #include "gc/shenandoah/shenandoahWorkGroup.hpp"
69 #include "gc/shenandoah/shenandoahWorkerPolicy.hpp"
381 _pacer = NULL;
382 }
383
384 _control_thread = new ShenandoahControlThread();
385
386 log_info(gc, init)("Initialize Shenandoah heap: " SIZE_FORMAT "%s initial, " SIZE_FORMAT "%s min, " SIZE_FORMAT "%s max",
387 byte_size_in_proper_unit(_initial_size), proper_unit_for_byte_size(_initial_size),
388 byte_size_in_proper_unit(_minimum_size), proper_unit_for_byte_size(_minimum_size),
389 byte_size_in_proper_unit(max_capacity()), proper_unit_for_byte_size(max_capacity())
390 );
391
392 log_info(gc, init)("Safepointing mechanism: thread-local poll");
393
394 return JNI_OK;
395 }
396
397 void ShenandoahHeap::initialize_heuristics() {
398 if (ShenandoahGCMode != NULL) {
399 if (strcmp(ShenandoahGCMode, "normal") == 0) {
400 _gc_mode = new ShenandoahNormalMode();
401 } else if (strcmp(ShenandoahGCMode, "iu") == 0) {
402 _gc_mode = new ShenandoahIUMode();
403 } else if (strcmp(ShenandoahGCMode, "passive") == 0) {
404 _gc_mode = new ShenandoahPassiveMode();
405 } else {
406 vm_exit_during_initialization("Unknown -XX:ShenandoahGCMode option");
407 }
408 } else {
409 ShouldNotReachHere();
410 }
411 _gc_mode->initialize_flags();
412 if (_gc_mode->is_diagnostic() && !UnlockDiagnosticVMOptions) {
413 vm_exit_during_initialization(
414 err_msg("GC mode \"%s\" is diagnostic, and must be enabled via -XX:+UnlockDiagnosticVMOptions.",
415 _gc_mode->name()));
416 }
417 if (_gc_mode->is_experimental() && !UnlockExperimentalVMOptions) {
418 vm_exit_during_initialization(
419 err_msg("GC mode \"%s\" is experimental, and must be enabled via -XX:+UnlockExperimentalVMOptions.",
420 _gc_mode->name()));
421 }
422 log_info(gc, init)("Shenandoah GC mode: %s",
|