Skip to content
Closed
Changes from 3 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
3 changes: 3 additions & 0 deletions src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ void G1CSetCandidateGroup::calculate_efficiency() {
}

double G1CSetCandidateGroup::liveness_percent() const {
if (length() == 0) {
return 0.0f;
}
size_t capacity = length() * G1HeapRegion::GrainBytes;
return ((capacity - _reclaimable_bytes) * 100.0) / capacity;
}
Expand Down