diff --git a/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp b/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp index cff53e840591c..0d8a3166f7993 100644 --- a/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp +++ b/src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp @@ -132,14 +132,14 @@ jint ParallelScavengeHeap::initialize() { void ParallelScavengeHeap::initialize_serviceability() { - _eden_pool = new EdenMutableSpacePool(_young_gen, - _young_gen->eden_space(), - "PS Eden Space", - false /* support_usage_threshold */); - - _survivor_pool = new SurvivorMutableSpacePool(_young_gen, - "PS Survivor Space", - false /* support_usage_threshold */); + _eden_pool = new PSEdenSpacePool(_young_gen, + _young_gen->eden_space(), + "PS Eden Space", + false /* support_usage_threshold */); + + _survivor_pool = new PSSurvivorSpacePool(_young_gen, + "PS Survivor Space", + false /* support_usage_threshold */); _old_pool = new PSOldGenerationPool(_old_gen, "PS Old Gen", diff --git a/src/hotspot/share/gc/parallel/psMemoryPool.cpp b/src/hotspot/share/gc/parallel/psMemoryPool.cpp index 81c7b17a1ef57..40170f62f0651 100644 --- a/src/hotspot/share/gc/parallel/psMemoryPool.cpp +++ b/src/hotspot/share/gc/parallel/psMemoryPool.cpp @@ -39,16 +39,16 @@ MemoryUsage PSOldGenerationPool::get_memory_usage() { return MemoryUsage(initial_size(), used, committed, maxSize); } -// The max size of EdenMutableSpacePool = +// The max size of PSEdenSpacePool = // max size of the PSYoungGen - capacity of two survivor spaces // // Max size of PS eden space is changing due to ergonomic. // PSYoungGen, PSOldGen, Eden, Survivor spaces are all resizable. // -EdenMutableSpacePool::EdenMutableSpacePool(PSYoungGen* young_gen, - MutableSpace* space, - const char* name, - bool support_usage_threshold) : +PSEdenSpacePool::PSEdenSpacePool(PSYoungGen* young_gen, + MutableSpace* space, + const char* name, + bool support_usage_threshold) : CollectedMemoryPool(name, space->capacity_in_bytes(), (young_gen->max_gen_size() - young_gen->from_space()->capacity_in_bytes() - @@ -58,7 +58,7 @@ EdenMutableSpacePool::EdenMutableSpacePool(PSYoungGen* young_gen, _space(space) { } -MemoryUsage EdenMutableSpacePool::get_memory_usage() { +MemoryUsage PSEdenSpacePool::get_memory_usage() { size_t maxSize = (available_for_allocation() ? max_size() : 0); size_t used = used_in_bytes(); size_t committed = _space->capacity_in_bytes(); @@ -66,20 +66,20 @@ MemoryUsage EdenMutableSpacePool::get_memory_usage() { return MemoryUsage(initial_size(), used, committed, maxSize); } -// The max size of SurvivorMutableSpacePool = +// The max size of PSSurvivorSpacePool = // current capacity of the from-space // // PS from and to survivor spaces could have different sizes. // -SurvivorMutableSpacePool::SurvivorMutableSpacePool(PSYoungGen* young_gen, - const char* name, - bool support_usage_threshold) : +PSSurvivorSpacePool::PSSurvivorSpacePool(PSYoungGen* young_gen, + const char* name, + bool support_usage_threshold) : CollectedMemoryPool(name, young_gen->from_space()->capacity_in_bytes(), young_gen->from_space()->capacity_in_bytes(), support_usage_threshold), _young_gen(young_gen) { } -MemoryUsage SurvivorMutableSpacePool::get_memory_usage() { +MemoryUsage PSSurvivorSpacePool::get_memory_usage() { size_t maxSize = (available_for_allocation() ? max_size() : 0); size_t used = used_in_bytes(); size_t committed = committed_in_bytes(); diff --git a/src/hotspot/share/gc/parallel/psMemoryPool.hpp b/src/hotspot/share/gc/parallel/psMemoryPool.hpp index 0da47e5a8ef79..ed9793203d4d2 100644 --- a/src/hotspot/share/gc/parallel/psMemoryPool.hpp +++ b/src/hotspot/share/gc/parallel/psMemoryPool.hpp @@ -43,16 +43,16 @@ class PSOldGenerationPool : public CollectedMemoryPool { size_t max_size() const { return _old_gen->reserved().byte_size(); } }; -class EdenMutableSpacePool : public CollectedMemoryPool { +class PSEdenSpacePool : public CollectedMemoryPool { private: PSYoungGen* _young_gen; MutableSpace* _space; public: - EdenMutableSpacePool(PSYoungGen* young_gen, - MutableSpace* space, - const char* name, - bool support_usage_threshold); + PSEdenSpacePool(PSYoungGen* young_gen, + MutableSpace* space, + const char* name, + bool support_usage_threshold); MutableSpace* space() { return _space; } MemoryUsage get_memory_usage(); @@ -65,14 +65,14 @@ class EdenMutableSpacePool : public CollectedMemoryPool { } }; -class SurvivorMutableSpacePool : public CollectedMemoryPool { +class PSSurvivorSpacePool : public CollectedMemoryPool { private: PSYoungGen* _young_gen; public: - SurvivorMutableSpacePool(PSYoungGen* young_gen, - const char* name, - bool support_usage_threshold); + PSSurvivorSpacePool(PSYoungGen* young_gen, + const char* name, + bool support_usage_threshold); MemoryUsage get_memory_usage();