26 #include "gc/shared/collectedHeap.hpp"
27 #include "gc/shared/gcConfiguration.hpp"
28 #include "memory/universe.hpp"
29 #include "runtime/arguments.hpp"
30 #include "runtime/globals.hpp"
31 #include "utilities/debug.hpp"
32
33 GCName GCConfiguration::young_collector() const {
34 if (UseG1GC) {
35 return G1New;
36 }
37
38 if (UseParallelGC) {
39 return ParallelScavenge;
40 }
41
42 if (UseConcMarkSweepGC) {
43 return ParNew;
44 }
45
46 if (UseZGC) {
47 return NA;
48 }
49
50 return DefNew;
51 }
52
53 GCName GCConfiguration::old_collector() const {
54 if (UseG1GC) {
55 return G1Old;
56 }
57
58 if (UseConcMarkSweepGC) {
59 return ConcurrentMarkSweep;
60 }
61
62 if (UseParallelOldGC) {
63 return ParallelOld;
64 }
65
66 if (UseZGC) {
67 return Z;
68 }
69
70 return SerialOld;
71 }
72
73 uint GCConfiguration::num_parallel_gc_threads() const {
74 return ParallelGCThreads;
75 }
76
77 uint GCConfiguration::num_concurrent_gc_threads() const {
78 return ConcGCThreads;
79 }
80
81 bool GCConfiguration::uses_dynamic_gc_threads() const {
82 return UseDynamicNumberOfGCThreads;
83 }
84
85 bool GCConfiguration::is_explicit_gc_concurrent() const {
86 return ExplicitGCInvokesConcurrent;
87 }
|
26 #include "gc/shared/collectedHeap.hpp"
27 #include "gc/shared/gcConfiguration.hpp"
28 #include "memory/universe.hpp"
29 #include "runtime/arguments.hpp"
30 #include "runtime/globals.hpp"
31 #include "utilities/debug.hpp"
32
33 GCName GCConfiguration::young_collector() const {
34 if (UseG1GC) {
35 return G1New;
36 }
37
38 if (UseParallelGC) {
39 return ParallelScavenge;
40 }
41
42 if (UseConcMarkSweepGC) {
43 return ParNew;
44 }
45
46 if (UseZGC || UseShenandoahGC) {
47 return NA;
48 }
49
50 return DefNew;
51 }
52
53 GCName GCConfiguration::old_collector() const {
54 if (UseG1GC) {
55 return G1Old;
56 }
57
58 if (UseConcMarkSweepGC) {
59 return ConcurrentMarkSweep;
60 }
61
62 if (UseParallelOldGC) {
63 return ParallelOld;
64 }
65
66 if (UseZGC) {
67 return Z;
68 }
69
70 if (UseShenandoahGC) {
71 return Shenandoah;
72 }
73
74 return SerialOld;
75 }
76
77 uint GCConfiguration::num_parallel_gc_threads() const {
78 return ParallelGCThreads;
79 }
80
81 uint GCConfiguration::num_concurrent_gc_threads() const {
82 return ConcGCThreads;
83 }
84
85 bool GCConfiguration::uses_dynamic_gc_threads() const {
86 return UseDynamicNumberOfGCThreads;
87 }
88
89 bool GCConfiguration::is_explicit_gc_concurrent() const {
90 return ExplicitGCInvokesConcurrent;
91 }
|