From a61860511f67038962c54e114599948ca103dae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Sikstr=C3=B6m?= Date: Wed, 4 Sep 2024 08:56:02 +0000 Subject: [PATCH] 8339399: ZGC: Remove unnecessary page reset when splitting pages Reviewed-by: stefank, eosterlund, aboldtch --- src/hotspot/share/gc/z/zPage.cpp | 9 +-------- src/hotspot/share/gc/z/zPage.hpp | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/hotspot/share/gc/z/zPage.cpp b/src/hotspot/share/gc/z/zPage.cpp index 318b2417ee5..bfeda56de37 100644 --- a/src/hotspot/share/gc/z/zPage.cpp +++ b/src/hotspot/share/gc/z/zPage.cpp @@ -97,11 +97,6 @@ void ZPage::verify_remset_after_reset(ZPageAge prev_age, ZPageResetType type) { // Old-to-old reset switch (type) { - case ZPageResetType::Splitting: - // Page is on the way to be destroyed or reused, delay - // clearing until the page is reset for Allocation. - break; - case ZPageResetType::InPlaceRelocation: // Relocation failed and page is being compacted in-place. // The remset bits are flipped each young mark start, so @@ -188,11 +183,9 @@ ZPage* ZPage::split(size_t split_of_size) { ZPage* ZPage::split_with_pmem(ZPageType type, const ZPhysicalMemory& pmem) { // Resize this page const ZVirtualMemory vmem = _virtual.split(pmem.size()); + assert(vmem.end() == _virtual.start(), "Should be consecutive"); reset_type_and_size(type_from_size(_virtual.size())); - reset(_age, ZPageResetType::Splitting); - - assert(vmem.end() == _virtual.start(), "Should be consecutive"); log_trace(gc, page)("Split page [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT "]", untype(vmem.start()), diff --git a/src/hotspot/share/gc/z/zPage.hpp b/src/hotspot/share/gc/z/zPage.hpp index e07b338c710..3c9b3deda9f 100644 --- a/src/hotspot/share/gc/z/zPage.hpp +++ b/src/hotspot/share/gc/z/zPage.hpp @@ -44,8 +44,6 @@ enum class ZPageResetType { // Page was not selected for relocation, all objects // stayed, but the page aged. FlipAging, - // The page was split and needs to be reset - Splitting, }; class ZPage : public CHeapObj {