Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
17244c6
8368159: Significant performance overhead when started with jdwp agen…
Sep 25, 2025
e6ddb39
8368525: nmethod ic cleanup
Sep 25, 2025
847b107
8365191: Cleanup after removing LockingMode related code
fbredber Sep 25, 2025
ba44656
8366454: TLS1.3 server fails with bad_record_mac when receiving encry…
friedbyalice Sep 25, 2025
d407ef6
8368251: Parallel: Refactor lgrp_id used in MutableNUMASpace
jsikstro Sep 25, 2025
d85e410
8368546: java/net/httpclient/RedirectTimeoutTest.java fails intermitt…
dfuch Sep 25, 2025
4f4030a
8333526: Restructure java/nio/channels/DatagramChannel/StressNativeSi…
serhiysachkov Sep 25, 2025
44cb9ca
8368518: [s390x] test failure with failed: wrong size of mach node
offamitkumar Sep 25, 2025
67cb53d
8368206: RISC-V: compiler/vectorapi/VectorMaskCompareNotTest.java fai…
DingliZhang Sep 25, 2025
2407eb0
8367867: [macosx] Ignorable whitespace in text not removed when printing
Sep 25, 2025
52e5504
8368089: G1: G1PeriodicGCTask::should_start_periodic_gc may use unini…
hgqxjj Sep 25, 2025
77a71c5
8366896: JFR: Use GarbageCollection.name in gc view
egahlin Sep 25, 2025
26b5708
8360882: Tests throw SkippedException when they should fail
Sep 25, 2025
d1ea6ea
8367103: RISC-V: store cpu features in a bitmap
Sep 25, 2025
2b45113
8359378: aarch64: crash when using -XX:+UseFPUForSpilling
Sep 25, 2025
043aeaf
8368552: H3ErrorHandlingTest.testCloseControlStream intermittent time…
Sep 25, 2025
569e780
8365820: Apply certificate scope constraints to algorithms in "signat…
artur-oracle Sep 25, 2025
8ca1fea
8368499: GenShen: Do not collect age census during evac when adaptive…
Sep 25, 2025
7412219
8368261: Serial: Use more precise nmethod scope during Full GC marking
albertnetymk Sep 25, 2025
de1f5a3
8368468: Split out everything but configure results from spec.gmk
magicus Sep 25, 2025
32ab0db
8368674: Incremental builds keep rebuilding interim jmod
magicus Sep 25, 2025
5c596e2
8360463: Ambiguity in Cipher.getInstance() specification between NoSu…
slumericanB Sep 25, 2025
80cb0ea
8367133: DTLS: fragmentation of Finished message results in handshake…
djelinski Sep 25, 2025
a48538d
8367324: Avoid redundant parsing when formatting with DigitList
j3graham Sep 25, 2025
3c9fd76
8368514: TLS stateless session ticket decryption fails on some providers
djelinski Sep 25, 2025
52e7778
8367910: Reduce warnings about unsupported classes in AOT cache creation
iklam Sep 25, 2025
648582a
8368714: [BACKOUT] JDK-8368468 Split out everything but configure res…
Sep 25, 2025
ca03080
8368030: Make package bundlers stateless
Sep 26, 2025
a663812
8368124: Show useful thread names in ASAN reports
tstuefe Sep 26, 2025
8730780
8368006: Parallel: Skip full regions in dense prefix during Full GC
albertnetymk Sep 26, 2025
b90799c
8368616: runtime/cds/appcds/aotCache/JavaAgent.java#dynamic fails on …
ArnoZeller Sep 26, 2025
a80ba62
8357691: File blocked.certs contains bad content when boot jdk 25 is …
MBaesken Sep 26, 2025
7bfdb01
8368565: Adjust comment regarding dependency of libjvm.so to librt
MBaesken Sep 26, 2025
f0e1078
8368250: [AIX] now ubsan vptr check is also possible (follow up of JD…
Sep 26, 2025
bdb7d25
8358723: jpackage signing issues: the main launcher doesn't have enti…
Sep 26, 2025
2360542
8368683: [process] Increase jtreg debug output maxOutputSize for Tree…
Sep 26, 2025
501b2b3
8368615: VSCode IDE: Oracle Java extension routinely runs out of memory
mhaessig Sep 26, 2025
25abdd8
8368752: Serial: Remove unused arg of DefNewGeneration::gc_epilogue
albertnetymk Sep 26, 2025
aa6ff45
8368693: Duplicate methods in vmClasses
Sep 26, 2025
bdf6853
8368328: CompactNumberFormat.clone does not produce independent insta…
naotoj Sep 26, 2025
556dfdd
8308027: GetThreadListStackTraces/OneGetThreadListStackTraces.java sh…
lmesnik Sep 26, 2025
62cc347
8368699: nsk/jvmti/scenarios/events/EM04/em04t001/em04t001.cpp destro…
lmesnik Sep 26, 2025
c6cecc5
8283198: Remove src/jdk.hotspot.agent/test
fandreuz Sep 26, 2025
12c0f29
8368498: Use JUnit instead of TestNG for jdk_text tests
Sep 26, 2025
cedc011
8365057: Add support for java.util.concurrent lock information to Thr…
Sep 26, 2025
37f0e74
8364305: Support AVX10 saturating floating point conversion instructions
Sep 26, 2025
5b1ebbb
8366561: Improve documentation for how the -Xlint flag works
archiecobbs Sep 27, 2025
9093d3a
8368668: Several vmTestbase/vm/gc/compact tests timed out on large me…
Sep 27, 2025
af8fb20
8368307: Shenandoah: get_next_bit_impl should special case weak and s…
kdnilsen Sep 27, 2025
320230d
8367795: HeadlessMalfunctionTest may fail due to timeout
mrserb Sep 28, 2025
e19ec6f
8368754: runtime/cds/appcds/SignedJar.java log regex is too strict
xmas92 Sep 29, 2025
d53190a
8366582: Test jdk/jshell/ToolSimpleTest.java failed: provider not found
lahodaj Sep 29, 2025
75269fd
8368715: Serial: Add GCTraceTime for marking from roots subphases dur…
albertnetymk Sep 29, 2025
08b677b
8071277: G1: Merge commits and uncommits of contiguous memory
Sep 29, 2025
6165921
7156751: [macosx] Problem with printing
Sep 29, 2025
fdbba04
8368775: Remove outdated comment in OutlineTextRenderer
Sep 29, 2025
9d9c0e0
8368793: java/lang/StringBuilder/RacingSBThreads.java timed out in Xc…
Sep 29, 2025
63688d8
8368822: Refactor Float16.valueOf(double)
jddarcy Sep 29, 2025
9d71af1
8367253: RISC-V: refactor dependent cpu extensions
Sep 29, 2025
aabf699
8355339: Test java/io/File/GetCanonicalPath.java failed: The specifie…
Sep 29, 2025
3d97e17
8367318: Test vmTestbase/nsk/jdi/MethodEntryRequest/addClassFilter_rt…
plummercj Sep 29, 2025
6c8e384
8356022: Migrate descriptor parsing from generics to BytecodeDescriptor
liach Sep 29, 2025
59e76af
8367967: C2: "fatal error: Not monotonic" with Mod nodes
SirYwell Sep 29, 2025
2f29b3f
8366884: NMT fails with MallocLimit: reached category "mtCompiler" limit
Sep 29, 2025
c57003c
8368890: open/test/jdk/tools/jpackage/macosx/NameWithSpaceTest.java f…
Sep 29, 2025
538a722
8368732: RISC-V: Detect support for misaligned vector access via hwprobe
RealFYang Sep 30, 2025
89af6e1
8362204: test/jdk/sun/awt/font/TestDevTransform.java fails on Ubuntu …
mrserb Sep 30, 2025
2746c1a
8367485: os::physical_memory is broken in 32-bit JVMs when running on…
toxaart Sep 30, 2025
c0a4c0b
8367981: Update CompactHashtable for readability
Sep 30, 2025
586167c
8363932: G1: Better distribute KlassCleaningTask
Sep 30, 2025
aea71cc
8342730: Get rid of SummaryDiff in VMATree
Sep 30, 2025
b19e872
8362573: Incorrect weight of the first ObjectAllocationSample JFR eve…
Sep 30, 2025
ba0a6ee
8368357: Some source files have initial blank lines
fandreuz Sep 30, 2025
64c46d8
8367953: JFR sampler threads does not appear in thread dump
YaSuenag Sep 30, 2025
8606d3f
8365060: Historical data for JDK 8 should include the jdk.net package
lahodaj Sep 30, 2025
444007f
8368842: Parallel: Refactor PCAddThreadRootsMarkingTaskClosure
albertnetymk Sep 30, 2025
07ea907
8361606: ConsumeNextMnemonicKeyTypedTest.java fails on Windows: chara…
anass-baya Sep 30, 2025
8cc54ec
8368563: JFR: Improve jfr query help text
egahlin Sep 30, 2025
6b4b102
8368809: JFR: Remove events from testSettingConfiguration in TestActi…
egahlin Sep 30, 2025
07ecc93
8367692: RISC-V: Align post call nop
robehn Sep 30, 2025
fe9dbcc
8368599: ShenandoahConcurrentMark could use ThreadsClaimTokenScope
fandreuz Sep 30, 2025
9b02896
8360558: Use hex literals instead of decimal literals in math intrins…
Sep 30, 2025
0366d88
8354894: java/lang/Thread/virtual/Starvation.java timeout on server w…
Oct 1, 2025
17d8fa8
8367026: Reorder the timeout failure handler commands to have jstack …
jaikiran Oct 1, 2025
8c3ca02
8368817: Convert JDK_Version::to_string to use stringStream instead o…
Oct 1, 2025
394eb80
8368957: Remove metaprogramming/logical.hpp in favor of C++17 facilities
Oct 1, 2025
1188ca5
8368954: G1: Document why G1 uses TLS storage for the current card ta…
Oct 1, 2025
6c2d383
8368953: Document the reason why Serial/Parallel/G1 use zero as dirty…
Oct 1, 2025
f49849a
8368893: RISC-V: crash after JDK-8352673 on fastdebug version
Oct 1, 2025
84e5d63
8368885: NMT CommandLine tests can check for error better
jdksjolen Oct 1, 2025
5a2700f
8368861: [TEST] compiler/floatingpoint/ScalarFPtoIntCastTest.java exp…
reinrich Oct 1, 2025
3607e99
8367279: Test tools/javac/tree/TreePosTest.java timed out
lahodaj Oct 1, 2025
c69456e
8368962: hotspot/cpu/aarch64/bytecodes_aarch64.{hpp,cpp} is unused
jcking Oct 1, 2025
182fbc2
8368675: IGV: nodes are wrongly marked as changed in the difference view
robcasloz Oct 1, 2025
c54dcef
8368938: Remove ObjectWaiter::badObjectWaiterPtr
fandreuz Oct 1, 2025
e44ef0c
8367704: Fix minor documentation issues in java.time.**
pavelrappo Oct 1, 2025
6b72b77
6177299: [Fmt-Nu] NumberFormat.getPercentInstance() does not work cor…
Oct 1, 2025
ef724f4
8368985: Small Float16 refactorings
jddarcy Oct 1, 2025
db6320d
8368968: FloatingDecimal: Clean up unused code
Oct 1, 2025
4df41d2
8368698: runtime/cds/appcds/aotCache/OldClassSupport.java assert(can_…
Oct 1, 2025
fa3af82
8338197: [ubsan] ad_x86.hpp:6417:11: runtime error: shift exponent 10…
Oct 1, 2025
5251405
8368848: JShell's code completion not always working for multi-snippe…
lahodaj Oct 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion make/ToolsJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_
TOOL_TZDB = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.tzdb.TzdbZoneRulesCompiler

TOOL_BLOCKED_CERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
TOOL_BLOCKED_CERTS = $(JAVA_SMALL) -Xlog:disable -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
build.tools.blockedcertsconverter.BlockedCertsConverter

Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-blibpath:/usr/lib:lib -Wl,-bnoexpall \
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
-Wl,-bernotok -Wl,-bcdtors:mbr::s -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
fi
Expand Down
9 changes: 7 additions & 2 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,14 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
# with an additional define LLVM_SYMBOLIZER, which we set here.
# To calculate the correct llvm_symbolizer path we can use the location of the compiler, because
# their relation is fixed.
# In the ubsan case we have to link every binary with the C++-compiler as linker, because inherently
# the C-Compiler and the C++-compiler used as linker provide a different set of ubsan exports.
# Linking an executable with the C-compiler and one of its shared libraries with the C++-compiler
# leeds to unresolved symbols.
if test "x$TOOLCHAIN_TYPE" = "xclang" && test "x$OPENJDK_TARGET_OS" = "xaix"; then
UBSAN_CFLAGS="$UBSAN_CFLAGS -fno-sanitize=function,vptr -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer"
UBSAN_LDFLAGS="$UBSAN_LDFLAGS -fno-sanitize=function,vptr -Wl,-bbigtoc"
UBSAN_CFLAGS="$UBSAN_CFLAGS -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer"
UBSAN_LDFLAGS="$UBSAN_LDFLAGS -Wl,-bbigtoc"
LD="$LDCXX"
fi
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
DESC: [enable UndefinedBehaviorSanitizer],
Expand Down
6 changes: 1 addition & 5 deletions make/autoconf/libraries.m4
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,8 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
fi
# librt for legacy clock_gettime
# librt - for timers (timer_* functions)
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Hotspot needs to link librt to get the clock_* functions.
# But once our supported minimum build and runtime platform
# has glibc 2.17, this can be removed as the functions are
# in libc.
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
fi
Expand Down
2 changes: 1 addition & 1 deletion make/common/Execute.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ define SetupExecuteBody
endif

$1_VARDEPS := $$($1_COMMAND) $$($1_PRE_COMMAND) $$($1_POST_COMMAND)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BASE)_exec.vardeps)

ifneq ($$($1_PRE_COMMAND), )

Expand Down
1 change: 1 addition & 0 deletions make/ide/vscode/hotspot/template-workspace.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// Java extension
"jdk.project.jdkhome": "{{OUTPUTDIR}}/jdk",
"jdk.java.onSave.organizeImports": false, // prevents unnecessary changes
"jdk.serverVmOptions": ["-Xmx2G"], // prevent out of memory

// Additional conventions
"files.associations": {
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ void MonitorEnterStub::emit_code(LIR_Assembler* ce) {

void MonitorExitStub::emit_code(LIR_Assembler* ce) {
__ bind(_entry);
if (_compute_lock) {
// lock_reg was destroyed by fast unlocking attempt => recompute it
ce->monitor_address(_monitor_ix, _lock_reg);
}

// lock_reg was destroyed by fast unlocking attempt => recompute it
ce->monitor_address(_monitor_ix, _lock_reg);

ce->store_parameter(_lock_reg->as_register(), 0);
// note: non-blocking leaf routine => no call info needed
StubId exit_id;
Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ int LIR_Assembler::emit_unwind_handler() {
MonitorExitStub* stub = nullptr;
if (method()->is_synchronized()) {
monitor_address(0, FrameMap::r0_opr);
stub = new MonitorExitStub(FrameMap::r0_opr, true, 0);
stub = new MonitorExitStub(FrameMap::r0_opr, 0);
__ unlock_object(r5, r4, r0, r6, *stub->entry());
__ bind(*stub->continuation());
}
Expand Down Expand Up @@ -2481,15 +2481,13 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register lock = op->lock_opr()->as_register();
Register temp = op->scratch_opr()->as_register();
if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
// add debug info for NullPointerException only if one is possible
int null_check_offset = __ lock_object(hdr, obj, lock, temp, *op->stub()->entry());
if (op->info() != nullptr) {
add_debug_info_for_null_check(null_check_offset, op->info());
}
// done
} else if (op->code() == lir_unlock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
__ unlock_object(hdr, obj, lock, temp, *op->stub()->entry());
} else {
Unimplemented();
Expand Down
14 changes: 7 additions & 7 deletions src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,28 @@ void C1_MacroAssembler::float_cmp(bool is_float, int unordered_result,
}
}

int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register temp, Label& slow_case) {
assert_different_registers(hdr, obj, disp_hdr, temp, rscratch2);
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register basic_lock, Register temp, Label& slow_case) {
assert_different_registers(hdr, obj, basic_lock, temp, rscratch2);
int null_check_offset = -1;

verify_oop(obj);

// save object being locked into the BasicObjectLock
str(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
str(obj, Address(basic_lock, BasicObjectLock::obj_offset()));

null_check_offset = offset();

lightweight_lock(disp_hdr, obj, hdr, temp, rscratch2, slow_case);
lightweight_lock(basic_lock, obj, hdr, temp, rscratch2, slow_case);

return null_check_offset;
}


void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Register temp, Label& slow_case) {
assert_different_registers(hdr, obj, disp_hdr, temp, rscratch2);
void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register basic_lock, Register temp, Label& slow_case) {
assert_different_registers(hdr, obj, basic_lock, temp, rscratch2);

// load object
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
ldr(obj, Address(basic_lock, BasicObjectLock::obj_offset()));
verify_oop(obj);

lightweight_unlock(obj, hdr, temp, rscratch2, slow_case);
Expand Down
22 changes: 11 additions & 11 deletions src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -55,19 +55,19 @@ using MacroAssembler::null_check;
Register result);

// locking
// hdr : must be r0, contents destroyed
// obj : must point to the object to lock, contents preserved
// disp_hdr: must point to the displaced header location, contents preserved
// temp : temporary register, must not be rscratch1 or rscratch2
// hdr : must be r0, contents destroyed
// obj : must point to the object to lock, contents preserved
// basic_lock: must point to the basic lock, contents preserved
// temp : temporary register, must not be rscratch1 or rscratch2
// returns code offset at which to add null check debug information
int lock_object (Register swap, Register obj, Register disp_hdr, Register temp, Label& slow_case);
int lock_object (Register swap, Register obj, Register basic_lock, Register temp, Label& slow_case);

// unlocking
// hdr : contents destroyed
// obj : must point to the object to lock, contents preserved
// disp_hdr: must be r0 & must point to the displaced header location, contents destroyed
// temp : temporary register, must not be rscratch1 or rscratch2
void unlock_object(Register swap, Register obj, Register lock, Register temp, Label& slow_case);
// hdr : contents destroyed
// obj : must point to the object to lock, contents preserved
// basic_lock: must be r0 & must point to the basic lock, contents destroyed
// temp : temporary register, must not be rscratch1 or rscratch2
void unlock_object(Register swap, Register obj, Register basic_lock, Register temp, Label& slow_case);

void initialize_object(
Register obj, // result: pointer to object after successful allocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,18 @@ void BarrierSetAssembler::check_oop(MacroAssembler* masm, Register obj, Register
OptoReg::Name BarrierSetAssembler::encode_float_vector_register_size(const Node* node, OptoReg::Name opto_reg) {
switch (node->ideal_reg()) {
case Op_RegF:
case Op_RegI: // RA may place scalar values (Op_RegI/N/L/P) in FP registers when UseFPUForSpilling is enabled
case Op_RegN:
// No need to refine. The original encoding is already fine to distinguish.
assert(opto_reg % 4 == 0, "Float register should only occupy a single slot");
assert(opto_reg % 4 == 0, "32-bit register should only occupy a single slot");
break;
// Use different encoding values of the same fp/vector register to help distinguish different sizes.
// Such as V16. The OptoReg::name and its corresponding slot value are
// "V16": 64, "V16_H": 65, "V16_J": 66, "V16_K": 67.
case Op_RegD:
case Op_VecD:
case Op_RegL:
case Op_RegP:
opto_reg &= ~3;
opto_reg |= 1;
break;
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1761,9 +1761,6 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
Label lock_done;

if (method->is_synchronized()) {
Label count;
const int mark_word_offset = BasicLock::displaced_header_offset_in_bytes();

// Get the handle (the 2nd argument)
__ mov(oop_handle_reg, c_rarg1);

Expand Down
7 changes: 4 additions & 3 deletions src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ void MonitorEnterStub::emit_code(LIR_Assembler* ce) {

void MonitorExitStub::emit_code(LIR_Assembler* ce) {
__ bind(_entry);
if (_compute_lock) {
ce->monitor_address(_monitor_ix, _lock_reg);
}

// lock_reg was destroyed by fast unlocking attempt => recompute it
ce->monitor_address(_monitor_ix, _lock_reg);

const Register lock_reg = _lock_reg->as_pointer_register();

ce->verify_reserved_argument_area_size(1);
Expand Down
3 changes: 1 addition & 2 deletions src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ int LIR_Assembler::emit_unwind_handler() {
MonitorExitStub* stub = nullptr;
if (method()->is_synchronized()) {
monitor_address(0, FrameMap::R0_opr);
stub = new MonitorExitStub(FrameMap::R0_opr, true, 0);
stub = new MonitorExitStub(FrameMap::R0_opr, 0);
__ unlock_object(R2, R1, R0, *stub->entry());
__ bind(*stub->continuation());
}
Expand Down Expand Up @@ -2427,7 +2427,6 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
Register lock = op->lock_opr()->as_pointer_register();

if (op->code() == lir_lock) {
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
int null_check_offset = __ lock_object(hdr, obj, lock, *op->stub()->entry());
if (op->info() != nullptr) {
add_debug_info_for_null_check(null_check_offset, op->info());
Expand Down
24 changes: 12 additions & 12 deletions src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,17 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len,
initialize_object(obj, tmp1, klass, len, tmp2, tmp3, header_size_in_bytes, -1, /* is_tlab_allocated */ UseTLAB);
}

int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register basic_lock, Label& slow_case) {
int null_check_offset = 0;

const Register tmp2 = Rtemp; // Rtemp should be free at c1 LIR level
assert_different_registers(hdr, obj, disp_hdr, tmp2);
assert_different_registers(hdr, obj, basic_lock, tmp2);

assert(BasicObjectLock::lock_offset() == 0, "adjust this code");
assert(oopDesc::mark_offset_in_bytes() == 0, "Required by atomic instructions");

// save object being locked into the BasicObjectLock
str(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
str(obj, Address(basic_lock, BasicObjectLock::obj_offset()));

null_check_offset = offset();

Expand All @@ -197,26 +197,26 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
b(slow_case, ne);
}

Register t1 = disp_hdr; // Needs saving, probably
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow
Register t1 = basic_lock; // Needs saving, probably
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow

lightweight_lock(obj, t1, t2, t3, 1 /* savemask - save t1 */, slow_case);
// Success: fall through
return null_check_offset;
}

void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
assert_different_registers(hdr, obj, disp_hdr, Rtemp);
void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register basic_lock, Label& slow_case) {
assert_different_registers(hdr, obj, basic_lock, Rtemp);

assert(BasicObjectLock::lock_offset() == 0, "adjust this code");
assert(oopDesc::mark_offset_in_bytes() == 0, "Required by atomic instructions");

ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
ldr(obj, Address(basic_lock, BasicObjectLock::obj_offset()));

Register t1 = disp_hdr; // Needs saving, probably
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow
Register t1 = basic_lock; // Needs saving, probably
Register t2 = hdr; // blow
Register t3 = Rtemp; // blow

lightweight_unlock(obj, t1, t2, t3, 1 /* savemask - save t1 */, slow_case);
// Success: fall through
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/arm/c1_MacroAssembler_arm.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -59,9 +59,9 @@
max_array_allocation_length = 0x01000000
};

int lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case);
int lock_object(Register hdr, Register obj, Register basic_lock, Label& slow_case);

void unlock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case);
void unlock_object(Register hdr, Register obj, Register basic_lock, Label& slow_case);

// This platform only uses signal-based null checks. The Label is not needed.
void null_check(Register r, Label *Lnull = nullptr) { MacroAssembler::null_check(r); }
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/cpu/arm/sharedRuntime_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,

const Register sync_handle = R5;
const Register sync_obj = R6;
const Register disp_hdr = altFP_7_11;
const Register basic_lock = altFP_7_11;
const Register tmp = R8;

Label slow_lock, lock_done, fast_lock;
Expand All @@ -1139,7 +1139,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
__ mov(sync_handle, R1);

log_trace(fastlock)("SharedRuntime lock fast");
__ lightweight_lock(sync_obj /* object */, disp_hdr /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
__ lightweight_lock(sync_obj /* object */, basic_lock /* t1 */, tmp /* t2 */, Rtemp /* t3 */,
0x7 /* savemask */, slow_lock);
// Fall through to lock_done
__ bind(lock_done);
Expand Down Expand Up @@ -1254,7 +1254,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,

// last_Java_frame is already set, so do call_VM manually; no exception can occur
__ mov(R0, sync_obj);
__ mov(R1, disp_hdr);
__ mov(R1, basic_lock);
__ mov(R2, Rthread);
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_locking_C));

Expand All @@ -1269,12 +1269,12 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,

// Clear pending exception before reentering VM.
// Can store the oop in register since it is a leaf call.
assert_different_registers(Rtmp_save1, sync_obj, disp_hdr);
assert_different_registers(Rtmp_save1, sync_obj, basic_lock);
__ ldr(Rtmp_save1, Address(Rthread, Thread::pending_exception_offset()));
Register zero = __ zero_register(Rtemp);
__ str(zero, Address(Rthread, Thread::pending_exception_offset()));
__ mov(R0, sync_obj);
__ mov(R1, disp_hdr);
__ mov(R1, basic_lock);
__ mov(R2, Rthread);
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::complete_monitor_unlocking_C));
__ str(Rtmp_save1, Address(Rthread, Thread::pending_exception_offset()));
Expand Down
7 changes: 4 additions & 3 deletions src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ void MonitorEnterStub::emit_code(LIR_Assembler* ce) {

void MonitorExitStub::emit_code(LIR_Assembler* ce) {
__ bind(_entry);
if (_compute_lock) {
ce->monitor_address(_monitor_ix, _lock_reg);
}

// lock_reg was destroyed by fast unlocking attempt => recompute it
ce->monitor_address(_monitor_ix, _lock_reg);

address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? StubId::c1_monitorexit_id : StubId::c1_monitorexit_nofpu_id);
//__ load_const_optimized(R0, stub);
__ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int LIR_Assembler::emit_unwind_handler() {
MonitorExitStub* stub = nullptr;
if (method()->is_synchronized()) {
monitor_address(0, FrameMap::R4_opr);
stub = new MonitorExitStub(FrameMap::R4_opr, true, 0);
stub = new MonitorExitStub(FrameMap::R4_opr, 0);
__ unlock_object(R5, R6, R4, *stub->entry());
__ bind(*stub->continuation());
}
Expand Down Expand Up @@ -2614,7 +2614,6 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
// Obj may not be an oop.
if (op->code() == lir_lock) {
MonitorEnterStub* stub = (MonitorEnterStub*)op->stub();
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
// Add debug info for NullPointerException only if one is possible.
if (op->info() != nullptr) {
if (!os::zero_page_read_protected() || !ImplicitNullChecks) {
Expand All @@ -2626,7 +2625,6 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
__ lock_object(hdr, obj, lock, op->scratch_opr()->as_register(), *op->stub()->entry());
} else {
assert (op->code() == lir_unlock, "Invalid code, expected lir_unlock");
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
__ unlock_object(hdr, obj, lock, *op->stub()->entry());
}
__ bind(*op->stub()->continuation());
Expand Down
Loading
Loading