Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8272165: Consolidate mark_must_be_preserved() variants #5057

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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