--- old/src/hotspot/share/oops/markOop.hpp 2019-04-25 11:54:10.471682470 +0200 +++ new/src/hotspot/share/oops/markOop.hpp 2019-04-25 11:54:09.722657244 +0200 @@ -177,6 +177,15 @@ assert(has_bias_pattern(), "should not call this otherwise"); return (JavaThread*) ((intptr_t) (mask_bits(value(), ~(biased_lock_mask_in_place | age_mask_in_place | epoch_mask_in_place)))); } + bool biased_locker_is(JavaThread* thread) const { + if (!has_bias_pattern()) { + return false; + } + // If current thread is not the owner it can be unbiased at anytime. + JavaThread* jt = (JavaThread*) ((intptr_t) (mask_bits(value(), ~(biased_lock_mask_in_place | age_mask_in_place | epoch_mask_in_place)))); + return jt == thread; + } + // Indicates that the mark has the bias bit set but that it has not // yet been biased toward a particular thread bool is_biased_anonymously() const {