< prev index next >

src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

Print this page
@@ -117,12 +117,12 @@
      str(hdr, Address(disp_hdr, 0));
      // otherwise we don't care about the result and handle locking via runtime call
      cbnz(hdr, slow_case);
      // done
      bind(done);
+     inc_held_monitor_count();
    }
-   increment(Address(rthread, JavaThread::held_monitor_count_offset()));
    return null_check_offset;
  }
  
  
  void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Register temp, Label& slow_case) {

@@ -157,12 +157,12 @@
      } else {
        cmpxchgptr(disp_hdr, hdr, obj, rscratch2, done, &slow_case);
      }
      // done
      bind(done);
+     dec_held_monitor_count();
    }
-   decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
  }
  
  
  // Defines obj, preserves var_size_in_bytes
  void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, int con_size_in_bytes, Register t1, Register t2, Label& slow_case) {
< prev index next >