changeset 5021:042420b675e8

8038440: backport few C2 fixes Summary: Backports few C2 fixes Reviewed-by: kvn, kevinw
author poonam
date Wed, 09 Apr 2014 09:14:16 -0700
parents ed45fe52d455
children a40c5b54f6b3
files src/share/vm/opto/runtime.cpp src/share/vm/opto/runtime.hpp src/share/vm/runtime/arguments.cpp
diffstat 3 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/runtime.cpp	Mon Mar 31 23:28:28 2014 +0400
+++ b/src/share/vm/opto/runtime.cpp	Wed Apr 09 09:14:16 2014 -0700
@@ -1307,6 +1307,7 @@
   // add counters so this is safe.
   NamedCounter* head;
   do {
+    c->set_next(NULL);
     head = _named_counters;
     c->set_next(head);
   } while (Atomic::cmpxchg_ptr(c, &_named_counters, head) != head);
--- a/src/share/vm/opto/runtime.hpp	Mon Mar 31 23:28:28 2014 +0400
+++ b/src/share/vm/opto/runtime.hpp	Wed Apr 09 09:14:16 2014 -0700
@@ -85,7 +85,7 @@
 
   NamedCounter* next() const    { return _next; }
   void set_next(NamedCounter* next) {
-    assert(_next == NULL, "already set");
+    assert(_next == NULL || next == NULL, "already set");
     _next = next;
   }
 
--- a/src/share/vm/runtime/arguments.cpp	Mon Mar 31 23:28:28 2014 +0400
+++ b/src/share/vm/runtime/arguments.cpp	Wed Apr 09 09:14:16 2014 -0700
@@ -3284,9 +3284,6 @@
 #endif // CC_INTERP
 
 #ifdef COMPILER2
-  if (!UseBiasedLocking || EmitSync != 0) {
-    UseOptoBiasInlining = false;
-  }
   if (!EliminateLocks) {
     EliminateNestedLocks = false;
   }
@@ -3330,6 +3327,12 @@
     }
   }
 
+#ifdef COMPILER2
+  if (!UseBiasedLocking || EmitSync != 0) {
+    UseOptoBiasInlining = false;
+  }
+#endif
+
   // set PauseAtExit if the gamma launcher was used and a debugger is attached
   // but only if not already set on the commandline
   if (Arguments::created_by_gamma_launcher() && os::is_debugger_attached()) {