Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit ea02307

Browse files
committedAug 22, 2020
Merge
2 parents 57e72cf + b223700 commit ea02307

File tree

149 files changed

+1147
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1147
-439
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

+7
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,13 @@ encode %{
35113511
// Load markWord from object into displaced_header.
35123512
__ ldr(disp_hdr, Address(oop, oopDesc::mark_offset_in_bytes()));
35133513

3514+
if (DiagnoseSyncOnPrimitiveWrappers != 0) {
3515+
__ load_klass(tmp, oop);
3516+
__ ldrw(tmp, Address(tmp, Klass::access_flags_offset()));
3517+
__ tstw(tmp, JVM_ACC_IS_BOX_CLASS);
3518+
__ br(Assembler::NE, cont);
3519+
}
3520+
35143521
if (UseBiasedLocking && !UseOptoBiasInlining) {
35153522
__ biased_locking_enter(box, oop, disp_hdr, tmp, true, cont);
35163523
}

‎src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -73,11 +73,18 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
7373
// save object being locked into the BasicObjectLock
7474
str(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
7575

76+
null_check_offset = offset();
77+
78+
if (DiagnoseSyncOnPrimitiveWrappers != 0) {
79+
load_klass(hdr, obj);
80+
ldrw(hdr, Address(hdr, Klass::access_flags_offset()));
81+
tstw(hdr, JVM_ACC_IS_BOX_CLASS);
82+
br(Assembler::NE, slow_case);
83+
}
84+
7685
if (UseBiasedLocking) {
7786
assert(scratch != noreg, "should have scratch register at this point");
78-
null_check_offset = biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
79-
} else {
80-
null_check_offset = offset();
87+
biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
8188
}
8289

8390
// Load object header

0 commit comments

Comments
 (0)