From 5acd37fa9625fd53dd705ba536a8ae6c7e54ed7d Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 23 Jan 2024 09:40:09 +0000 Subject: [PATCH] 8324207: Serial: Remove Space::set_saved_mark_word Reviewed-by: tschatzl, stefank --- src/hotspot/share/gc/serial/defNewGeneration.inline.hpp | 1 - src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp | 2 -- src/hotspot/share/gc/shared/space.hpp | 2 -- src/hotspot/share/gc/shared/space.inline.hpp | 3 +-- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hotspot/share/gc/serial/defNewGeneration.inline.hpp b/src/hotspot/share/gc/serial/defNewGeneration.inline.hpp index 1f0a5df78b1cd..808e04a300261 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.inline.hpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.inline.hpp @@ -41,7 +41,6 @@ void DefNewGeneration::oop_since_save_marks_iterate(OopClosureType* cl) { assert(from()->saved_mark_at_top(), "inv"); to()->oop_since_save_marks_iterate(cl); - to()->set_saved_mark(); } #endif // SHARE_GC_SERIAL_DEFNEWGENERATION_INLINE_HPP diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp index 31d32745b0d61..4f8b51c99ffe9 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp @@ -68,8 +68,6 @@ bool TenuredGeneration::block_is_obj(const HeapWord* addr) const { template void TenuredGeneration::oop_since_save_marks_iterate(OopClosureType* blk) { _the_space->oop_since_save_marks_iterate(blk); - - save_marks(); } #endif // SHARE_GC_SERIAL_TENUREDGENERATION_INLINE_HPP diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp index 85f870ba1e2af..0f59fcb9f6993 100644 --- a/src/hotspot/share/gc/shared/space.hpp +++ b/src/hotspot/share/gc/shared/space.hpp @@ -82,8 +82,6 @@ class Space: public CHeapObj { HeapWord* saved_mark_word() const { return _saved_mark_word; } - void set_saved_mark_word(HeapWord* p) { _saved_mark_word = p; } - // Returns a subregion of the space containing only the allocated objects in // the space. virtual MemRegion used_region() const = 0; diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp index bfaf84e8fac01..924a8630f722c 100644 --- a/src/hotspot/share/gc/shared/space.inline.hpp +++ b/src/hotspot/share/gc/shared/space.inline.hpp @@ -71,13 +71,12 @@ void ContiguousSpace::oop_since_save_marks_iterate(OopClosureType* blk) { t = top(); while (p < t) { Prefetch::write(p, interval); - debug_only(HeapWord* prev = p); oop m = cast_to_oop(p); p += m->oop_iterate_size(blk); } } while (t < top()); - set_saved_mark_word(p); + set_saved_mark(); } #endif // SHARE_GC_SHARED_SPACE_INLINE_HPP