< prev index next >

src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp

Print this page

 22  *
 23  */
 24 
 25 #include "precompiled.hpp"
 26 #include "gc/parallel/objectStartArray.inline.hpp"
 27 #include "gc/parallel/parallelArguments.hpp"
 28 #include "gc/parallel/parallelInitLogger.hpp"
 29 #include "gc/parallel/parallelScavengeHeap.inline.hpp"
 30 #include "gc/parallel/psAdaptiveSizePolicy.hpp"
 31 #include "gc/parallel/psMemoryPool.hpp"
 32 #include "gc/parallel/psParallelCompact.inline.hpp"
 33 #include "gc/parallel/psPromotionManager.hpp"
 34 #include "gc/parallel/psScavenge.hpp"
 35 #include "gc/parallel/psVMOperations.hpp"
 36 #include "gc/shared/gcHeapSummary.hpp"
 37 #include "gc/shared/gcLocker.inline.hpp"
 38 #include "gc/shared/gcWhen.hpp"
 39 #include "gc/shared/genArguments.hpp"
 40 #include "gc/shared/locationPrinter.inline.hpp"
 41 #include "gc/shared/scavengableNMethods.hpp"

 42 #include "gc/shared/suspendibleThreadSet.hpp"
 43 #include "logging/log.hpp"
 44 #include "memory/iterator.hpp"
 45 #include "memory/metaspaceCounters.hpp"
 46 #include "memory/metaspaceUtils.hpp"
 47 #include "memory/universe.hpp"
 48 #include "nmt/memTracker.hpp"
 49 #include "oops/oop.inline.hpp"
 50 #include "runtime/cpuTimeCounters.hpp"
 51 #include "runtime/handles.inline.hpp"
 52 #include "runtime/java.hpp"
 53 #include "runtime/vmThread.hpp"
 54 #include "services/memoryManager.hpp"
 55 #include "utilities/macros.hpp"
 56 #include "utilities/vmError.hpp"
 57 
 58 PSYoungGen*  ParallelScavengeHeap::_young_gen = nullptr;
 59 PSOldGen*    ParallelScavengeHeap::_old_gen = nullptr;
 60 PSAdaptiveSizePolicy* ParallelScavengeHeap::_size_policy = nullptr;
 61 PSGCAdaptivePolicyCounters* ParallelScavengeHeap::_gc_policy_counters = nullptr;

112                              max_gc_pause_sec,
113                              GCTimeRatio
114                              );
115 
116   assert((old_gen()->virtual_space()->high_boundary() ==
117           young_gen()->virtual_space()->low_boundary()),
118          "Boundaries must meet");
119   // initialize the policy counters - 2 collectors, 2 generations
120   _gc_policy_counters =
121     new PSGCAdaptivePolicyCounters("ParScav:MSC", 2, 2, _size_policy);
122 
123   if (!PSParallelCompact::initialize_aux_data()) {
124     return JNI_ENOMEM;
125   }
126 
127   // Create CPU time counter
128   CPUTimeCounters::create_counter(CPUTimeGroups::CPUTimeType::gc_parallel_workers);
129 
130   ParallelInitLogger::print();
131 


132   return JNI_OK;
133 }
134 
135 void ParallelScavengeHeap::initialize_serviceability() {
136 
137   _eden_pool = new EdenMutableSpacePool(_young_gen,
138                                         _young_gen->eden_space(),
139                                         "PS Eden Space",
140                                         false /* support_usage_threshold */);
141 
142   _survivor_pool = new SurvivorMutableSpacePool(_young_gen,
143                                                 "PS Survivor Space",
144                                                 false /* support_usage_threshold */);
145 
146   _old_pool = new PSGenerationPool(_old_gen,
147                                    "PS Old Gen",
148                                    true /* support_usage_threshold */);
149 
150   _young_manager = new GCMemoryManager("PS Scavenge");
151   _old_manager = new GCMemoryManager("PS MarkSweep");

 22  *
 23  */
 24 
 25 #include "precompiled.hpp"
 26 #include "gc/parallel/objectStartArray.inline.hpp"
 27 #include "gc/parallel/parallelArguments.hpp"
 28 #include "gc/parallel/parallelInitLogger.hpp"
 29 #include "gc/parallel/parallelScavengeHeap.inline.hpp"
 30 #include "gc/parallel/psAdaptiveSizePolicy.hpp"
 31 #include "gc/parallel/psMemoryPool.hpp"
 32 #include "gc/parallel/psParallelCompact.inline.hpp"
 33 #include "gc/parallel/psPromotionManager.hpp"
 34 #include "gc/parallel/psScavenge.hpp"
 35 #include "gc/parallel/psVMOperations.hpp"
 36 #include "gc/shared/gcHeapSummary.hpp"
 37 #include "gc/shared/gcLocker.inline.hpp"
 38 #include "gc/shared/gcWhen.hpp"
 39 #include "gc/shared/genArguments.hpp"
 40 #include "gc/shared/locationPrinter.inline.hpp"
 41 #include "gc/shared/scavengableNMethods.hpp"
 42 #include "gc/shared/slidingForwarding.inline.hpp"
 43 #include "gc/shared/suspendibleThreadSet.hpp"
 44 #include "logging/log.hpp"
 45 #include "memory/iterator.hpp"
 46 #include "memory/metaspaceCounters.hpp"
 47 #include "memory/metaspaceUtils.hpp"
 48 #include "memory/universe.hpp"
 49 #include "nmt/memTracker.hpp"
 50 #include "oops/oop.inline.hpp"
 51 #include "runtime/cpuTimeCounters.hpp"
 52 #include "runtime/handles.inline.hpp"
 53 #include "runtime/java.hpp"
 54 #include "runtime/vmThread.hpp"
 55 #include "services/memoryManager.hpp"
 56 #include "utilities/macros.hpp"
 57 #include "utilities/vmError.hpp"
 58 
 59 PSYoungGen*  ParallelScavengeHeap::_young_gen = nullptr;
 60 PSOldGen*    ParallelScavengeHeap::_old_gen = nullptr;
 61 PSAdaptiveSizePolicy* ParallelScavengeHeap::_size_policy = nullptr;
 62 PSGCAdaptivePolicyCounters* ParallelScavengeHeap::_gc_policy_counters = nullptr;

113                              max_gc_pause_sec,
114                              GCTimeRatio
115                              );
116 
117   assert((old_gen()->virtual_space()->high_boundary() ==
118           young_gen()->virtual_space()->low_boundary()),
119          "Boundaries must meet");
120   // initialize the policy counters - 2 collectors, 2 generations
121   _gc_policy_counters =
122     new PSGCAdaptivePolicyCounters("ParScav:MSC", 2, 2, _size_policy);
123 
124   if (!PSParallelCompact::initialize_aux_data()) {
125     return JNI_ENOMEM;
126   }
127 
128   // Create CPU time counter
129   CPUTimeCounters::create_counter(CPUTimeGroups::CPUTimeType::gc_parallel_workers);
130 
131   ParallelInitLogger::print();
132 
133   SlidingForwarding::initialize(heap_rs.region(), ParallelCompactData::RegionSize);
134 
135   return JNI_OK;
136 }
137 
138 void ParallelScavengeHeap::initialize_serviceability() {
139 
140   _eden_pool = new EdenMutableSpacePool(_young_gen,
141                                         _young_gen->eden_space(),
142                                         "PS Eden Space",
143                                         false /* support_usage_threshold */);
144 
145   _survivor_pool = new SurvivorMutableSpacePool(_young_gen,
146                                                 "PS Survivor Space",
147                                                 false /* support_usage_threshold */);
148 
149   _old_pool = new PSGenerationPool(_old_gen,
150                                    "PS Old Gen",
151                                    true /* support_usage_threshold */);
152 
153   _young_manager = new GCMemoryManager("PS Scavenge");
154   _old_manager = new GCMemoryManager("PS MarkSweep");
< prev index next >