Skip to content

Commit

Permalink
8324207: Serial: Remove Space::set_saved_mark_word
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, stefank
  • Loading branch information
albertnetymk committed Jan 23, 2024
1 parent f5e6d11 commit 5acd37f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/hotspot/share/gc/serial/defNewGeneration.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ bool TenuredGeneration::block_is_obj(const HeapWord* addr) const {
template <typename OopClosureType>
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
2 changes: 0 additions & 2 deletions src/hotspot/share/gc/shared/space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class Space: public CHeapObj<mtGC> {

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;
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/share/gc/shared/space.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 comment on commit 5acd37f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.