8272165: Consolidate mark_must_be_preserved() variants

Reviewed-by: tschatzl
This commit is contained in:
Roman Kennke 2021-08-19 10:16:55 +00:00
parent ab41812951
commit 03b5e99d99
4 changed files with 1 additions and 12 deletions

View file

@ -32,7 +32,7 @@
#include "utilities/stack.inline.hpp" #include "utilities/stack.inline.hpp"
inline bool PreservedMarks::should_preserve_mark(oop obj, markWord m) const { 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) { inline void PreservedMarks::push(oop obj, markWord m) {

View file

@ -159,12 +159,6 @@ class markWord {
return (!is_unlocked() || !has_no_hash()); 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 // WARNING: The following routines are used EXCLUSIVELY by
// synchronization functions. They are not really gc safe. // synchronization functions. They are not really gc safe.
// They must get updated if markWord layout get changed. // They must get updated if markWord layout get changed.

View file

@ -292,7 +292,6 @@ class oopDesc {
// Checks if the mark word needs to be preserved // Checks if the mark word needs to be preserved
inline bool mark_must_be_preserved() const; inline bool mark_must_be_preserved() const;
inline bool mark_must_be_preserved(markWord m) 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(); static bool has_klass_gap();

View file

@ -398,8 +398,4 @@ bool oopDesc::mark_must_be_preserved(markWord m) const {
return m.must_be_preserved(this); 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 #endif // SHARE_OOPS_OOP_INLINE_HPP