mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-16 00:19:27 +00:00
8220593: ZGC: Remove superfluous ZPage::is_detached()
Reviewed-by: stefank, eosterlund
This commit is contained in:
parent
3f4dfa422c
commit
cc4ae9ab95
@ -258,9 +258,7 @@ void ZHeap::after_flip() {
|
||||
// Map all pages
|
||||
ZPageTableIterator iter(&_page_table);
|
||||
for (ZPage* page; iter.next(&page);) {
|
||||
if (!page->is_detached()) {
|
||||
_page_allocator.map_page(page);
|
||||
}
|
||||
_page_allocator.map_page(page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,12 +48,11 @@ ZPage::ZPage(uint8_t type, ZVirtualMemory vmem, ZPhysicalMemory pmem) :
|
||||
|
||||
ZPage::~ZPage() {
|
||||
assert(!is_active(), "Should not be active");
|
||||
assert(is_detached(), "Should be detached");
|
||||
assert(_physical.is_null(), "Should be detached");
|
||||
}
|
||||
|
||||
void ZPage::reset() {
|
||||
assert(!is_active(), "Should not be active");
|
||||
assert(!is_detached(), "Should not be detached");
|
||||
|
||||
_seqnum = ZGlobalSeqNum;
|
||||
_top = start();
|
||||
@ -67,11 +66,10 @@ void ZPage::reset() {
|
||||
}
|
||||
|
||||
void ZPage::print_on(outputStream* out) const {
|
||||
out->print_cr(" %-6s " PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT " %s%s%s%s",
|
||||
out->print_cr(" %-6s " PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT " %s%s%s",
|
||||
type_to_string(), start(), top(), end(),
|
||||
is_allocating() ? " Allocating" : "",
|
||||
is_relocatable() ? " Relocatable" : "",
|
||||
is_detached() ? " Detached" : "",
|
||||
!is_active() ? " Inactive" : "");
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,6 @@ public:
|
||||
|
||||
bool is_allocating() const;
|
||||
bool is_relocatable() const;
|
||||
bool is_detached() const;
|
||||
|
||||
bool is_mapped() const;
|
||||
void set_pre_mapped();
|
||||
|
||||
@ -165,10 +165,6 @@ inline bool ZPage::is_relocatable() const {
|
||||
return is_active() && _seqnum < ZGlobalSeqNum;
|
||||
}
|
||||
|
||||
inline bool ZPage::is_detached() const {
|
||||
return _physical.is_null();
|
||||
}
|
||||
|
||||
inline bool ZPage::is_mapped() const {
|
||||
return _seqnum > 0;
|
||||
}
|
||||
|
||||
@ -119,7 +119,6 @@ ZPage* ZPageCache::alloc_page(uint8_t type, size_t size) {
|
||||
|
||||
void ZPageCache::free_page(ZPage* page) {
|
||||
assert(!page->is_active(), "Invalid page state");
|
||||
assert(!page->is_detached(), "Invalid page state");
|
||||
|
||||
const uint8_t type = page->type();
|
||||
if (type == ZPageTypeSmall) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user