src/hotspot/cpu/aarch64/templateTable_aarch64.cpp
branchepsilon-gc-branch
changeset 56406 e629240491c7
parent 56348 f3b0961adb3c
parent 49480 d7df2dd501ce
child 56407 dddf5c49f4fc
--- a/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp	Mon Mar 26 17:27:47 2018 +0200
+++ b/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp	Tue Apr 10 11:14:50 2018 +0200
@@ -35,6 +35,7 @@
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
+#include "runtime/frame.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/synchronizer.hpp"
@@ -184,7 +185,7 @@
       }
       break;
 #endif // INCLUDE_ALL_GCS
-    case BarrierSet::CardTableModRef:
+    case BarrierSet::CardTableBarrierSet:
       {
         if (val == noreg) {
           __ store_heap_oop_null(obj);
@@ -1905,7 +1906,8 @@
                                            in_bytes(InvocationCounter::counter_offset()));
         const Address mask(r1, in_bytes(MethodData::backedge_mask_offset()));
         __ increment_mask_and_jump(mdo_backedge_counter, increment, mask,
-                                   r0, rscratch1, false, Assembler::EQ, &backedge_counter_overflow);
+                                   r0, rscratch1, false, Assembler::EQ,
+                                   UseOnStackReplacement ? &backedge_counter_overflow : &dispatch);
         __ b(dispatch);
       }
       __ bind(no_mdo);
@@ -1913,7 +1915,8 @@
       __ ldr(rscratch1, Address(rmethod, Method::method_counters_offset()));
       const Address mask(rscratch1, in_bytes(MethodCounters::backedge_mask_offset()));
       __ increment_mask_and_jump(Address(rscratch1, be_offset), increment, mask,
-                                 r0, rscratch2, false, Assembler::EQ, &backedge_counter_overflow);
+                                 r0, rscratch2, false, Assembler::EQ,
+                                 UseOnStackReplacement ? &backedge_counter_overflow : &dispatch);
     } else { // not TieredCompilation
       // increment counter
       __ ldr(rscratch2, Address(rmethod, Method::method_counters_offset()));
@@ -1961,8 +1964,8 @@
         }
       }
     }
+    __ bind(dispatch);
   }
-  __ bind(dispatch);
 
   // Pre-load the next target bytecode into rscratch1
   __ load_unsigned_byte(rscratch1, Address(rbcp, 0));
@@ -1982,7 +1985,7 @@
       __ b(dispatch);
     }
 
-    if (TieredCompilation || UseOnStackReplacement) {
+    if (UseOnStackReplacement) {
       // invocation counter overflow
       __ bind(backedge_counter_overflow);
       __ neg(r2, r2);
@@ -1992,11 +1995,6 @@
                  CAST_FROM_FN_PTR(address,
                                   InterpreterRuntime::frequency_counter_overflow),
                  r2);
-      if (!UseOnStackReplacement)
-        __ b(dispatch);
-    }
-
-    if (UseOnStackReplacement) {
       __ load_unsigned_byte(r1, Address(rbcp, 0));  // restore target bytecode
 
       // r0: osr nmethod (osr ok) or NULL (osr not possible)