changeset 451:a60eabc24e2c

Merge
author kamg
date Tue, 25 Nov 2008 15:59:23 -0500
parents b22701a8b88f (diff) f9d938ede196 (current diff)
children 434912c745cf
files
diffstat 4 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/templateTable_sparc.cpp	Fri Nov 21 16:11:18 2008 -0800
+++ b/src/cpu/sparc/vm/templateTable_sparc.cpp	Tue Nov 25 15:59:23 2008 -0500
@@ -2085,7 +2085,7 @@
     } else {
       if (has_tos) {
       // save object pointer before call_VM() clobbers it
-        __ mov(Otos_i, Lscratch);
+        __ push_ptr(Otos_i);  // put object on tos where GC wants it.
       } else {
         // Load top of stack (do not pop the value off the stack);
         __ ld_ptr(Lesp, Interpreter::expr_offset_in_bytes(0), Otos_i);
@@ -2097,7 +2097,7 @@
     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_field_access),
                Otos_i, Rcache);
     if (!is_static && has_tos) {
-      __ mov(Lscratch, Otos_i);  // restore object pointer
+      __ pop_ptr(Otos_i);  // restore object pointer
       __ verify_oop(Otos_i);
     }
     __ get_cache_and_index_at_bcp(Rcache, index, 1);
--- a/src/share/vm/runtime/arguments.cpp	Fri Nov 21 16:11:18 2008 -0800
+++ b/src/share/vm/runtime/arguments.cpp	Tue Nov 25 15:59:23 2008 -0500
@@ -2322,7 +2322,12 @@
       return JNI_ERR;
     }
   }
-
+  // Change the default value for flags  which have different default values
+  // when working with older JDKs.
+  if (JDK_Version::current().compare_major(6) <= 0 &&
+      FLAG_IS_DEFAULT(UseVMInterruptibleIO)) {
+    FLAG_SET_DEFAULT(UseVMInterruptibleIO, true);
+  }
   return JNI_OK;
 }
 
--- a/src/share/vm/runtime/biasedLocking.cpp	Fri Nov 21 16:11:18 2008 -0800
+++ b/src/share/vm/runtime/biasedLocking.cpp	Tue Nov 25 15:59:23 2008 -0500
@@ -582,13 +582,19 @@
   if (heuristics == HR_NOT_BIASED) {
     return NOT_BIASED;
   } else if (heuristics == HR_SINGLE_REVOKE) {
-    if (mark->biased_locker() == THREAD) {
+    Klass *k = Klass::cast(obj->klass());
+    markOop prototype_header = k->prototype_header();
+    if (mark->biased_locker() == THREAD &&
+        prototype_header->bias_epoch() == mark->bias_epoch()) {
       // A thread is trying to revoke the bias of an object biased
       // toward it, again likely due to an identity hash code
       // computation. We can again avoid a safepoint in this case
       // since we are only going to walk our own stack. There are no
       // races with revocations occurring in other threads because we
       // reach no safepoints in the revocation path.
+      // Also check the epoch because even if threads match, another thread
+      // can come in with a CAS to steal the bias of an object that has a
+      // stale epoch.
       ResourceMark rm;
       if (TraceBiasedLocking) {
         tty->print_cr("Revoking bias by walking my own stack:");
--- a/src/share/vm/runtime/globals.hpp	Fri Nov 21 16:11:18 2008 -0800
+++ b/src/share/vm/runtime/globals.hpp	Tue Nov 25 15:59:23 2008 -0500
@@ -3262,9 +3262,10 @@
   diagnostic(bool, PrintDTraceDOF, false,                                   \
              "Print the DTrace DOF passed to the system for JSDT probes")   \
                                                                             \
-  product(bool, UseVMInterruptibleIO, true,                                 \
+  product(bool, UseVMInterruptibleIO, false,                                \
           "(Unstable, Solaris-specific) Thread interrupt before or with "   \
-          "EINTR for I/O operations results in OS_INTRPT")
+          "EINTR for I/O operations results in OS_INTRPT. The default value"\
+          " of this flag is true for JDK 6 and earliers")
 
 
 /*