equal
deleted
inserted
replaced
210 |
210 |
211 _pools_list->append(pool); |
211 _pools_list->append(pool); |
212 return (MemoryPool*) pool; |
212 return (MemoryPool*) pool; |
213 } |
213 } |
214 |
214 |
215 MemoryPool* MemoryService::add_survivor_spaces(DefNewGeneration* gen, |
215 MemoryPool* MemoryService::add_survivor_spaces(DefNewGeneration* young_gen, |
216 const char* name, |
216 const char* name, |
217 bool is_heap, |
217 bool is_heap, |
218 size_t max_size, |
218 size_t max_size, |
219 bool support_usage_threshold) { |
219 bool support_usage_threshold) { |
220 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); |
220 MemoryPool::PoolType type = (is_heap ? MemoryPool::Heap : MemoryPool::NonHeap); |
221 SurvivorContiguousSpacePool* pool = new SurvivorContiguousSpacePool(gen, name, type, max_size, support_usage_threshold); |
221 SurvivorContiguousSpacePool* pool = new SurvivorContiguousSpacePool(young_gen, name, type, max_size, support_usage_threshold); |
222 |
222 |
223 _pools_list->append(pool); |
223 _pools_list->append(pool); |
224 return (MemoryPool*) pool; |
224 return (MemoryPool*) pool; |
225 } |
225 } |
226 |
226 |
326 } |
326 } |
327 } |
327 } |
328 |
328 |
329 |
329 |
330 #if INCLUDE_ALL_GCS |
330 #if INCLUDE_ALL_GCS |
331 void MemoryService::add_psYoung_memory_pool(PSYoungGen* gen, MemoryManager* major_mgr, MemoryManager* minor_mgr) { |
331 void MemoryService::add_psYoung_memory_pool(PSYoungGen* young_gen, MemoryManager* major_mgr, MemoryManager* minor_mgr) { |
332 assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers"); |
332 assert(major_mgr != NULL && minor_mgr != NULL, "Should have two managers"); |
333 |
333 |
334 // Add a memory pool for each space and young gen doesn't |
334 // Add a memory pool for each space and young gen doesn't |
335 // support low memory detection as it is expected to get filled up. |
335 // support low memory detection as it is expected to get filled up. |
336 EdenMutableSpacePool* eden = new EdenMutableSpacePool(gen, |
336 EdenMutableSpacePool* eden = new EdenMutableSpacePool(young_gen, |
337 gen->eden_space(), |
337 young_gen->eden_space(), |
338 "PS Eden Space", |
338 "PS Eden Space", |
339 MemoryPool::Heap, |
339 MemoryPool::Heap, |
340 false /* support_usage_threshold */); |
340 false /* support_usage_threshold */); |
341 |
341 |
342 SurvivorMutableSpacePool* survivor = new SurvivorMutableSpacePool(gen, |
342 SurvivorMutableSpacePool* survivor = new SurvivorMutableSpacePool(young_gen, |
343 "PS Survivor Space", |
343 "PS Survivor Space", |
344 MemoryPool::Heap, |
344 MemoryPool::Heap, |
345 false /* support_usage_threshold */); |
345 false /* support_usage_threshold */); |
346 |
346 |
347 major_mgr->add_pool(eden); |
347 major_mgr->add_pool(eden); |
350 minor_mgr->add_pool(survivor); |
350 minor_mgr->add_pool(survivor); |
351 _pools_list->append(eden); |
351 _pools_list->append(eden); |
352 _pools_list->append(survivor); |
352 _pools_list->append(survivor); |
353 } |
353 } |
354 |
354 |
355 void MemoryService::add_psOld_memory_pool(PSOldGen* gen, MemoryManager* mgr) { |
355 void MemoryService::add_psOld_memory_pool(PSOldGen* old_gen, MemoryManager* mgr) { |
356 PSGenerationPool* old_gen = new PSGenerationPool(gen, |
356 PSGenerationPool* old_gen_pool = new PSGenerationPool(old_gen, |
357 "PS Old Gen", |
357 "PS Old Gen", |
358 MemoryPool::Heap, |
358 MemoryPool::Heap, |
359 true /* support_usage_threshold */); |
359 true /* support_usage_threshold */); |
360 mgr->add_pool(old_gen); |
360 mgr->add_pool(old_gen_pool); |
361 _pools_list->append(old_gen); |
361 _pools_list->append(old_gen_pool); |
362 } |
362 } |
363 |
363 |
364 void MemoryService::add_g1YoungGen_memory_pool(G1CollectedHeap* g1h, |
364 void MemoryService::add_g1YoungGen_memory_pool(G1CollectedHeap* g1h, |
365 MemoryManager* major_mgr, |
365 MemoryManager* major_mgr, |
366 MemoryManager* minor_mgr) { |
366 MemoryManager* minor_mgr) { |
546 CHECK_NH); |
546 CHECK_NH); |
547 return obj; |
547 return obj; |
548 } |
548 } |
549 // |
549 // |
550 // GC manager type depends on the type of Generation. Depending on the space |
550 // GC manager type depends on the type of Generation. Depending on the space |
551 // availablity and vm options the gc uses major gc manager or minor gc |
551 // availability and vm options the gc uses major gc manager or minor gc |
552 // manager or both. The type of gc manager depends on the generation kind. |
552 // manager or both. The type of gc manager depends on the generation kind. |
553 // For DefNew and ParNew generation doing scavenge gc uses minor gc manager (so |
553 // For DefNew and ParNew generation doing scavenge gc uses minor gc manager (so |
554 // _fullGC is set to false ) and for other generation kinds doing |
554 // _fullGC is set to false ) and for other generation kinds doing |
555 // mark-sweep-compact uses major gc manager (so _fullGC is set to true). |
555 // mark-sweep-compact uses major gc manager (so _fullGC is set to true). |
556 TraceMemoryManagerStats::TraceMemoryManagerStats(Generation::Name kind, GCCause::Cause cause) { |
556 TraceMemoryManagerStats::TraceMemoryManagerStats(Generation::Name kind, GCCause::Cause cause) { |