Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 11 additions & 11 deletions src/hotspot/share/gc/parallel/psMemoryPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() -
Expand All @@ -58,28 +58,28 @@ 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();

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();
Expand Down
18 changes: 9 additions & 9 deletions src/hotspot/share/gc/parallel/psMemoryPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();

Expand Down