Skip to content
Permalink
Browse files
8272165: Consolidate mark_must_be_preserved() variants
Reviewed-by: tschatzl
  • Loading branch information
rkennke committed Aug 19, 2021
1 parent ab41812 commit 03b5e99d998e037f84e9e2395b49321979c0acd8
@@ -32,7 +32,7 @@
#include "utilities/stack.inline.hpp"

inline bool PreservedMarks::should_preserve_mark(oop obj, markWord m) const {
return obj->mark_must_be_preserved_for_promotion_failure(m);
return obj->mark_must_be_preserved(m);
}

inline void PreservedMarks::push(oop obj, markWord m) {
@@ -159,12 +159,6 @@ class markWord {
return (!is_unlocked() || !has_no_hash());
}

// Should this header (including its age bits) be preserved in the
// case of a promotion failure during scavenge?
bool must_be_preserved_for_promotion_failure(const oopDesc* obj) const {
return (!is_unlocked() || !has_no_hash());
}

// WARNING: The following routines are used EXCLUSIVELY by
// synchronization functions. They are not really gc safe.
// They must get updated if markWord layout get changed.
@@ -292,7 +292,6 @@ class oopDesc {
// Checks if the mark word needs to be preserved
inline bool mark_must_be_preserved() const;
inline bool mark_must_be_preserved(markWord m) const;
inline bool mark_must_be_preserved_for_promotion_failure(markWord m) const;

static bool has_klass_gap();

@@ -398,8 +398,4 @@ bool oopDesc::mark_must_be_preserved(markWord m) const {
return m.must_be_preserved(this);
}

bool oopDesc::mark_must_be_preserved_for_promotion_failure(markWord m) const {
return m.must_be_preserved_for_promotion_failure(this);
}

#endif // SHARE_OOPS_OOP_INLINE_HPP

1 comment on commit 03b5e99

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 03b5e99 Aug 19, 2021

Please sign in to comment.