From b4cea701c9cab15007c485088dd5b8d7025d83ef Mon Sep 17 00:00:00 2001 From: Guoxiong Li Date: Tue, 23 Apr 2024 16:32:20 +0000 Subject: [PATCH] 8330693: Generational ZGC: Simplify ZAddress::finalizable_good and ZAddress::mark_good Reviewed-by: stefank, eosterlund --- src/hotspot/share/gc/z/zAddress.inline.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hotspot/share/gc/z/zAddress.inline.hpp b/src/hotspot/share/gc/z/zAddress.inline.hpp index 7f3a52e3594..4adbf50bc86 100644 --- a/src/hotspot/share/gc/z/zAddress.inline.hpp +++ b/src/hotspot/share/gc/z/zAddress.inline.hpp @@ -600,9 +600,7 @@ inline zpointer ZAddress::finalizable_good(zaddress addr, zpointer prev) { return color_null(); } - const uintptr_t non_mark_bits_mask = ZPointerMarkMetadataMask ^ ZPointerAllMetadataMask; - const uintptr_t non_mark_prev_bits = untype(prev) & non_mark_bits_mask; - return color(addr, ZPointerLoadGoodMask | ZPointerMarkedYoung | ZPointerFinalizable | non_mark_prev_bits | ZPointerRememberedMask); + return color(addr, ZPointerLoadGoodMask | ZPointerMarkedYoung | ZPointerFinalizable | ZPointerRememberedMask); } inline zpointer ZAddress::mark_good(zaddress addr, zpointer prev) { @@ -610,9 +608,7 @@ inline zpointer ZAddress::mark_good(zaddress addr, zpointer prev) { return color_null(); } - const uintptr_t non_mark_bits_mask = ZPointerMarkMetadataMask ^ ZPointerAllMetadataMask; - const uintptr_t non_mark_prev_bits = untype(prev) & non_mark_bits_mask; - return color(addr, ZPointerLoadGoodMask | ZPointerMarkedYoung | ZPointerMarkedOld | non_mark_prev_bits | ZPointerRememberedMask); + return color(addr, ZPointerLoadGoodMask | ZPointerMarkedYoung | ZPointerMarkedOld | ZPointerRememberedMask); } inline zpointer ZAddress::mark_old_good(zaddress addr, zpointer prev) {