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 return DefNew; 47 } 48 49 GCName GCConfiguration::old_collector() const { 50 if (UseG1GC) { 51 return G1Old; 52 } 53 54 if (UseConcMarkSweepGC) { 55 return ConcurrentMarkSweep; 56 } 57 58 if (UseParallelOldGC) { 59 return ParallelOld; 60 } 61 62 return SerialOld; 63 } 64 65 uint GCConfiguration::num_parallel_gc_threads() const { 66 return ParallelGCThreads; 67 } 68 69 uint GCConfiguration::num_concurrent_gc_threads() const { 70 return ConcGCThreads; 71 } 72 73 bool GCConfiguration::uses_dynamic_gc_threads() const { 74 return UseDynamicNumberOfGCThreads; 75 } 76 77 bool GCConfiguration::is_explicit_gc_concurrent() const { 78 return ExplicitGCInvokesConcurrent; 79 } | 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 } |