8229258: Rework markOop and markOopDesc into a simpler mark word value carrier

Reviewed-by: rkennke, coleenp, kbarrett, dcubed
This commit is contained in:
Stefan Karlsson 2019-08-06 10:48:21 +02:00
parent f075a3278b
commit ae5615c614
132 changed files with 1215 additions and 1236 deletions

View file

@ -1252,15 +1252,15 @@ void Deoptimization::relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaT
assert(!mon_info->owner_is_scalar_replaced() || realloc_failures, "reallocation was missed");
if (!mon_info->owner_is_scalar_replaced()) {
Handle obj(thread, mon_info->owner());
markOop mark = obj->mark();
if (UseBiasedLocking && mark->has_bias_pattern()) {
markWord mark = obj->mark();
if (UseBiasedLocking && mark.has_bias_pattern()) {
// New allocated objects may have the mark set to anonymously biased.
// Also the deoptimized method may called methods with synchronization
// where the thread-local object is bias locked to the current thread.
assert(mark->is_biased_anonymously() ||
mark->biased_locker() == thread, "should be locked to current thread");
assert(mark.is_biased_anonymously() ||
mark.biased_locker() == thread, "should be locked to current thread");
// Reset mark word to unbiased prototype.
markOop unbiased_prototype = markOopDesc::prototype()->set_age(mark->age());
markWord unbiased_prototype = markWord::prototype().set_age(mark.age());
obj->set_mark(unbiased_prototype);
}
BasicLock* lock = mon_info->lock();