Skip to content

Commit a618605

Browse files
jsikstrostefank
authored andcommitted
8339399: ZGC: Remove unnecessary page reset when splitting pages
Reviewed-by: stefank, eosterlund, aboldtch
1 parent f2c992c commit a618605

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/hotspot/share/gc/z/zPage.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ void ZPage::verify_remset_after_reset(ZPageAge prev_age, ZPageResetType type) {
9797

9898
// Old-to-old reset
9999
switch (type) {
100-
case ZPageResetType::Splitting:
101-
// Page is on the way to be destroyed or reused, delay
102-
// clearing until the page is reset for Allocation.
103-
break;
104-
105100
case ZPageResetType::InPlaceRelocation:
106101
// Relocation failed and page is being compacted in-place.
107102
// The remset bits are flipped each young mark start, so
@@ -188,11 +183,9 @@ ZPage* ZPage::split(size_t split_of_size) {
188183
ZPage* ZPage::split_with_pmem(ZPageType type, const ZPhysicalMemory& pmem) {
189184
// Resize this page
190185
const ZVirtualMemory vmem = _virtual.split(pmem.size());
186+
assert(vmem.end() == _virtual.start(), "Should be consecutive");
191187

192188
reset_type_and_size(type_from_size(_virtual.size()));
193-
reset(_age, ZPageResetType::Splitting);
194-
195-
assert(vmem.end() == _virtual.start(), "Should be consecutive");
196189

197190
log_trace(gc, page)("Split page [" PTR_FORMAT ", " PTR_FORMAT ", " PTR_FORMAT "]",
198191
untype(vmem.start()),

src/hotspot/share/gc/z/zPage.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ enum class ZPageResetType {
4444
// Page was not selected for relocation, all objects
4545
// stayed, but the page aged.
4646
FlipAging,
47-
// The page was split and needs to be reset
48-
Splitting,
4947
};
5048

5149
class ZPage : public CHeapObj<mtGC> {

0 commit comments

Comments
 (0)