diff src/share/vm/runtime/biasedLocking.cpp @ 14443:3205e78d8193

8029396: PPC64 (part 212): Several memory ordering fixes in C-code. Summary: memory ordering fixes in GC and other runtime code showing on PPC64. Reviewed-by: kvn, coleenp
author goetz
date Mon, 02 Dec 2013 10:26:14 +0100
parents 190899198332
children 3df21373e577
line wrap: on
line diff
--- a/src/share/vm/runtime/biasedLocking.cpp	Thu Dec 05 15:13:12 2013 -0800
+++ b/src/share/vm/runtime/biasedLocking.cpp	Mon Dec 02 10:26:14 2013 +0100
@@ -233,8 +233,10 @@
     // 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));
+    // 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");