equal
deleted
inserted
replaced
1365 } |
1365 } |
1366 |
1366 |
1367 // On MP platform loads could return 'stale' values in some cases. |
1367 // On MP platform loads could return 'stale' values in some cases. |
1368 // That is acceptable since either CAS or slow case path is taken in the worst case. |
1368 // That is acceptable since either CAS or slow case path is taken in the worst case. |
1369 |
1369 |
1370 andr(tmp_reg, swap_reg, (uintx)markWord::biased_lock_mask_in_place); |
1370 andr(tmp_reg, swap_reg, markWord::biased_lock_mask_in_place); |
1371 cmp(tmp_reg, markWord::biased_lock_pattern); |
1371 cmp(tmp_reg, markWord::biased_lock_pattern); |
1372 |
1372 |
1373 b(cas_label, ne); |
1373 b(cas_label, ne); |
1374 |
1374 |
1375 // The bias pattern is present in the object's header. Need to check |
1375 // The bias pattern is present in the object's header. Need to check |
1399 // header. |
1399 // header. |
1400 |
1400 |
1401 // If the low three bits in the xor result aren't clear, that means |
1401 // If the low three bits in the xor result aren't clear, that means |
1402 // the prototype header is no longer biased and we have to revoke |
1402 // the prototype header is no longer biased and we have to revoke |
1403 // the bias on this object. |
1403 // the bias on this object. |
1404 tst(tmp_reg, (uintx)markWord::biased_lock_mask_in_place); |
1404 tst(tmp_reg, markWord::biased_lock_mask_in_place); |
1405 b(try_revoke_bias, ne); |
1405 b(try_revoke_bias, ne); |
1406 |
1406 |
1407 // Biasing is still enabled for this data type. See whether the |
1407 // Biasing is still enabled for this data type. See whether the |
1408 // epoch of the current bias is still valid, meaning that the epoch |
1408 // epoch of the current bias is still valid, meaning that the epoch |
1409 // bits of the mark word are equal to the epoch bits of the |
1409 // bits of the mark word are equal to the epoch bits of the |
1411 // only change at a safepoint.) If not, attempt to rebias the object |
1411 // only change at a safepoint.) If not, attempt to rebias the object |
1412 // toward the current thread. Note that we must be absolutely sure |
1412 // toward the current thread. Note that we must be absolutely sure |
1413 // that the current epoch is invalid in order to do this because |
1413 // that the current epoch is invalid in order to do this because |
1414 // otherwise the manipulations it performs on the mark word are |
1414 // otherwise the manipulations it performs on the mark word are |
1415 // illegal. |
1415 // illegal. |
1416 tst(tmp_reg, (uintx)markWord::epoch_mask_in_place); |
1416 tst(tmp_reg, markWord::epoch_mask_in_place); |
1417 b(try_rebias, ne); |
1417 b(try_rebias, ne); |
1418 |
1418 |
1419 // tmp_reg has the age, epoch and pattern bits cleared |
1419 // tmp_reg has the age, epoch and pattern bits cleared |
1420 // The remaining (owner) bits are (Thread ^ current_owner) |
1420 // The remaining (owner) bits are (Thread ^ current_owner) |
1421 |
1421 |
1517 // a higher level. Second, if the bias was revoked while we held the |
1517 // a higher level. Second, if the bias was revoked while we held the |
1518 // lock, the object could not be rebiased toward another thread, so |
1518 // lock, the object could not be rebiased toward another thread, so |
1519 // the bias bit would be clear. |
1519 // the bias bit would be clear. |
1520 ldr(tmp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1520 ldr(tmp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes())); |
1521 |
1521 |
1522 andr(tmp_reg, tmp_reg, (uintx)markWord::biased_lock_mask_in_place); |
1522 andr(tmp_reg, tmp_reg, markWord::biased_lock_mask_in_place); |
1523 cmp(tmp_reg, markWord::biased_lock_pattern); |
1523 cmp(tmp_reg, markWord::biased_lock_pattern); |
1524 b(done, eq); |
1524 b(done, eq); |
1525 } |
1525 } |
1526 |
1526 |
1527 |
1527 |