src/share/vm/runtime/biasedLocking.cpp

changeset 6493
3205e78d8193
parent 5784
190899198332
child 6555
a57ba009d4dc
     1.1 --- a/src/share/vm/runtime/biasedLocking.cpp	Thu Dec 05 15:13:12 2013 -0800
     1.2 +++ b/src/share/vm/runtime/biasedLocking.cpp	Mon Dec 02 10:26:14 2013 +0100
     1.3 @@ -233,8 +233,10 @@
     1.4      // Fix up highest lock to contain displaced header and point
     1.5      // object at it
     1.6      highest_lock->set_displaced_header(unbiased_prototype);
     1.7 -    // Reset object header to point to displaced mark
     1.8 -    obj->set_mark(markOopDesc::encode(highest_lock));
     1.9 +    // Reset object header to point to displaced mark.
    1.10 +    // Must release storing the lock address for platforms without TSO
    1.11 +    // ordering (e.g. ppc).
    1.12 +    obj->release_set_mark(markOopDesc::encode(highest_lock));
    1.13      assert(!obj->mark()->has_bias_pattern(), "illegal mark state: stack lock used bias bit");
    1.14      if (TraceBiasedLocking && (Verbose || !is_bulk)) {
    1.15        tty->print_cr("  Revoked bias of currently-locked object");

mercurial