src/share/vm/runtime/biasedLocking.cpp

Print this page
rev 4810 : 8017317: PPC64 (part 7): cppInterpreter: implement support for biased locking
Summary: Also add a memory ordering operation in revoke_bias() needed without TSO.

*** 231,242 **** } if (highest_lock != NULL) { // Fix up highest lock to contain displaced header and point // object at it highest_lock->set_displaced_header(unbiased_prototype); ! // Reset object header to point to displaced mark ! obj->set_mark(markOopDesc::encode(highest_lock)); assert(!obj->mark()->has_bias_pattern(), "illegal mark state: stack lock used bias bit"); if (TraceBiasedLocking && (Verbose || !is_bulk)) { tty->print_cr(" Revoked bias of currently-locked object"); } } else { --- 231,244 ---- } if (highest_lock != NULL) { // Fix up highest lock to contain displaced header and point // object at it highest_lock->set_displaced_header(unbiased_prototype); ! // Reset object header to point to displaced mark. ! // Must release storing the lock address for platforms without TSO ! // ordering (e.g. ppc). ! obj->release_set_mark(markOopDesc::encode(highest_lock)); assert(!obj->mark()->has_bias_pattern(), "illegal mark state: stack lock used bias bit"); if (TraceBiasedLocking && (Verbose || !is_bulk)) { tty->print_cr(" Revoked bias of currently-locked object"); } } else {