< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page

        

@@ -131,21 +131,21 @@
         // with concurrent ExceptionCache cleanup. Therefore, the inserts roll
         // the head pointer forward to the first live ExceptionCache, so that the new
         // next pointers always point at live ExceptionCaches, that are not removed due
         // to concurrent ExceptionCache cleanup.
         ExceptionCache* next = ec->next();
-        if (Atomic::cmpxchg(next, &_exception_cache, ec) == ec) {
+        if (Atomic::cmpxchg(&_exception_cache, ec, next) == ec) {
           CodeCache::release_exception_cache(ec);
         }
         continue;
       }
       ec = exception_cache();
       if (ec != NULL) {
         new_entry->set_next(ec);
       }
     }
-    if (Atomic::cmpxchg(new_entry, &_exception_cache, ec) == ec) {
+    if (Atomic::cmpxchg(&_exception_cache, ec, new_entry) == ec) {
       return;
     }
   }
 }
 

@@ -174,11 +174,11 @@
     if (!curr->exception_type()->is_loader_alive()) {
       if (prev == NULL) {
         // Try to clean head; this is contended by concurrent inserts, that
         // both lazily clean the head, and insert entries at the head. If
         // the CAS fails, the operation is restarted.
-        if (Atomic::cmpxchg(next, &_exception_cache, curr) != curr) {
+        if (Atomic::cmpxchg(&_exception_cache, curr, next) != curr) {
           prev = NULL;
           curr = exception_cache_acquire();
           continue;
         }
       } else {

@@ -613,11 +613,11 @@
       metadata_Relocation* r = iter.metadata_reloc();
       Metadata* md = r->metadata_value();
       if (md != NULL && md->is_method()) {
         Method* method = static_cast<Method*>(md);
         if (!method->method_holder()->is_loader_alive()) {
-          Atomic::store((Method*)NULL, r->metadata_addr());
+          Atomic::store(r->metadata_addr(), (Method*)NULL);
 
           if (!r->metadata_is_immediate()) {
             r->fix_metadata_relocation();
           }
         }
< prev index next >