Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
e748632
8378559: Add setting of captured states like errno
Arraying Mar 11, 2026
2565121
8379448: [PPC64] Build without C2 broken after 8373595
TheRealMDoerr Mar 11, 2026
acbd1fe
8377658: Cleanup files for enabling conversion warnings for g1Concurr…
lkorinth Mar 11, 2026
c904a0e
8378338: Shenandoah: Heap-used generic verification error after updat…
shipilev Mar 11, 2026
97f9060
8379181: Convert ObjectMonitorTable to use Atomic<T>
xmas92 Mar 11, 2026
d496098
8373143: C2: verify that adr_type and adr's type match in LoadNode::m…
rwestrel Mar 11, 2026
ef55947
8379416: AIX build fails if system (not GNU) date tool is in PATH
MBaesken Mar 11, 2026
775f07e
8379435: More proposed cleanups for JDK-8373595 A new ObjectMonitorTa…
Mar 11, 2026
c315d1c
8357404: jpackage should attempt to get a package version from the JD…
Mar 11, 2026
30e569d
8379021: Shenandoah: Speedup ShenandoahSimpleBitMapTest
Mar 11, 2026
814b7f5
8378920: Remove AppContext from SequencedEvent
prrace Mar 11, 2026
39a2566
8378740: Suppressed warnings reported when implicit compilation is co…
lahodaj Mar 12, 2026
26bb357
8305250: Unnecessary "unknown enum constant" warning emitted by javac…
lahodaj Mar 12, 2026
73424d1
8379506: Parallel: Move Parallel specific flags to parallel_globals.hpp
albertnetymk Mar 12, 2026
fd80329
8379260: C2: Separate volatile barrier and full barrier
merykitty Mar 12, 2026
c6afd3c
8379460: C2: Notify AddI/AddL to URShiftI/URShiftL users
Mar 12, 2026
bd2972d
8379502: Remove unused PhaseOutput::need_register_stack_bang()
Mar 12, 2026
83f323d
8379704: [s390x] Build without C2 broken after 8373595
offamitkumar Mar 12, 2026
34a0235
8379548: java/util/logging/ParentLoggersTest.java failed with missing…
dfuch Mar 12, 2026
8444fda
8379778: SunGraphics2D improvements
Mar 12, 2026
ebcfd7d
8378267: Test sun/security/util/HexDumpEncoderTests.java fails when u…
myankelev Mar 12, 2026
a6f7089
8379799: Upstream redundant diffs fixed in Valhalla - langtool tests 1
liach Mar 12, 2026
618a3fe
8379795: Test SuspendResume3.java can timeout due to deadlock
pchilano Mar 12, 2026
e259691
8379937: NullActiveWindowOnFocusLost.java fails intermittently.
prrace Mar 12, 2026
d190c44
8379558: Test java/util/ResourceBundle/modules/basic/BasicTest.java …
naotoj Mar 12, 2026
579a3df
8379938: [macos] jpackage SigningPackageTest test doesn't create .pkg…
Mar 12, 2026
30be9c1
8378885: Add missing @Override annotations in "javax.print.attribute.…
mrserb Mar 12, 2026
6ff9545
8379027: Convert utilities/exceptions to use Atomic<T>
Mar 13, 2026
c0f4b26
8379710: Enable vector if-conversion IR matching tests for RISC-V
DingliZhang Mar 13, 2026
baf29eb
8379024: Convert utilities/vmError to use Atomic<T>
Mar 13, 2026
b5d1af1
8379026: Convert utilities/events to use Atomic<T>
Mar 13, 2026
bd73864
8279196: Test: jdk/jfr/event/gc/stacktrace/TestG1OldAllocationPending…
Mar 13, 2026
d93204e
8379025: Convert utilities/debug to use Atomic<T>
Mar 13, 2026
8c4d273
8379273: Convert miscellaneous utilities to use Atomic<T>
Mar 13, 2026
c9b7827
8294152: AArch64: frame::id() and frame::is_older() broken for interp…
toxaart Mar 13, 2026
38e8a46
8378331: G1: WeakProcessor IsAlive and KeepAlive closures not handlin…
kstefanj Mar 13, 2026
2dd7a20
8369503: [Linux] Move machine-specific queries to the OSContainer layer
caspernorrbin Mar 13, 2026
fec7229
8379625: PPC: cleanup C2 OptoAssembly
reinrich Mar 13, 2026
713664f
8379804: Refactor jdk/com/sun tests to use JUnit
sormuras Mar 13, 2026
1ea8ef9
8379781: G1: Full GC does not print partial array task stats
Mar 13, 2026
28830e2
8379917: JFR: Method timing event can have incorrect minimum value
egahlin Mar 13, 2026
a211b04
8378742: C2: constant folding for ModFloatingNode should be done in V…
hgqxjj Mar 13, 2026
e9446e1
8368841: X25519 implementation differs from the specification in RFC …
Mar 13, 2026
92fafa4
8377603: Review worst-case testing of inverse hyperbolic methods
toxaart Mar 13, 2026
1b81d0a
8379544: C2: URShiftI Ideal optimization opportunity for - 3rd level…
Mar 13, 2026
06ea385
8379528: Add @required in open/test/jdk/:jdk_sctp test, as these are …
Mar 13, 2026
fdb129a
8378893: X25519 should utilize a larger limb size
smemery Mar 13, 2026
9f2591d
8379828: Remove ResourceBundle module tests with legacy ISO code prop…
naotoj Mar 13, 2026
98520c0
8378657: OutputAnalyzer should have a quiet mode
fthevenet Mar 14, 2026
1606564
8379802: [AIX] unify DL_info struct and put it into a single header
MBaesken Mar 14, 2026
7484701
8309041: Swingutilities2 methods requesting focus can have a Cause
prsadhuk Mar 16, 2026
ef02358
8354901: javax/swing/JTable/8236907/LastVisibleRow.java fails on maco…
Mar 16, 2026
f430f1d
8378968: C2 VectorAVX AVX2: wrong result, bad optimization in VectorL…
eme64 Mar 16, 2026
c04fe76
8378524: Compile-time constant generated through annotation processor…
dbalek Mar 16, 2026
d3be157
8379457: Test EATests.java#id0 ERROR: monitor list errors: error_cnt=1
fbredber Mar 16, 2026
3b8af30
8379665: Obsolete AlwaysActAsServerClassMachine and NeverActAsServerC…
jsikstro Mar 16, 2026
caf7e84
8377541: C2: Memory Barrier IR nodes not eliminated for stable array …
mhaessig Mar 16, 2026
c0aa411
8378251: Extend word delimiters used in jshell
dbalek Mar 16, 2026
318646a
8379626: Refactor jaxp/functional/javax/xml tests to use JUnit
Mar 16, 2026
2240ff4
8379967: (process) Improve ProcessBuilder error reporting
tstuefe Mar 16, 2026
c7438a9
8376050: awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTe…
Mar 16, 2026
e0fa3d2
8353290: C2: Refactor PhaseIdealLoop::is_counted_loop()
tabjy Mar 16, 2026
02bce50
8377456: GetObjectSizeIntrinsicsTest.java, ARRAY_HEADER_SIZE wrong fo…
Mar 16, 2026
3ddfdd9
8353567: Tighten NMT lock scope in os::release_memory and os::uncommi…
roberttoyonaga Mar 16, 2026
7695b1f
8379155: Refactor Files TestNG tests to use JUnit
Mar 16, 2026
9dc3f48
8380079: Add separate flag for platforms on which copy and clear oper…
Mar 16, 2026
8d11b97
8380037: JFR: Don’t format identifiers as numbers
egahlin Mar 16, 2026
921da0a
8378211: Test ChangedJarFile.java failed: missing "timestamp has chan…
iklam Mar 17, 2026
3e23175
8380083: Enable some vector mask cast IR matching tests for RISC-V
DingliZhang Mar 17, 2026
a1e4621
8378152: Upstream AOT heap object improvements from Leyden repo
iklam Mar 17, 2026
b083157
8359706: Add file descriptor count to VM.info
Mar 17, 2026
3a109f4
8380236: macOS build is broken by JDK-8359706
Mar 17, 2026
0b17e00
8347396: Efficient TypeFunc creations
Harshit470250 Mar 17, 2026
da85caf
8380198: Convert java/util/prefs/PrefsSpiTest.java to JUnit
Mar 17, 2026
773c375
8380221: Change jdk/nio/Basic.java to use JUnit
Mar 17, 2026
9394749
8377769: Only use large pages sizes that have any pages configured
lkorinth Mar 17, 2026
ee90f00
8376822: UseCompactObjectHeaders: fill Klass alignment gaps in AOT cache
iklam Mar 17, 2026
00c1f4b
8377512: AOT cache creation fails with invalid native pointer
iklam Mar 17, 2026
8378d28
8379481: Recent JNI methods are missing DTrace probes
Mar 17, 2026
50f81c5
8379798: Refactor remaining tests in javax/xml/jaxp/functional to JUnit
Mar 17, 2026
abb9c33
8380125: Formatting issue for few swing classes
prsadhuk Mar 18, 2026
d52e5bd
8378727: [macOS] Missing dispatch_release for semaphores in CDesktopPeer
mrserb Mar 18, 2026
31de288
8367399: C2 SuperWord: add IR rules for MemorySegment cases from JDK-…
galderz Mar 18, 2026
d8f19bf
8347418: ConsoleIOContext.countTrailintBackslashes causes NullPointer…
dbalek Mar 18, 2026
706fbb3
8378431: Move input validation checks to Java for java.lang.StringUTF…
vy Mar 18, 2026
3a93daf
8373369: [REDO] Remove ThreadLocalAllocBuffer::_reserve_for_allocatio…
albertnetymk Mar 18, 2026
9ef2e8d
8278102: containers/docker/TestJcmd.java failed with "RuntimeExceptio…
Domest0s Mar 18, 2026
e99ed13
8379671: C2: Fix usage of PhaseGVN::transform in some intrinsics
merykitty Mar 18, 2026
262b31b
8359335: Template-Framework Library: Primitive Types subtyping
mhaessig Mar 18, 2026
08ff2bf
8376398: [TESTBUG] Testing of Unsafe native (re)allocation is sensiti…
Mar 18, 2026
00a7770
8380292: Confusing "reverted *" messages during training
Mar 18, 2026
0379c0b
8379557: Further optimize URL.toExternalForm
Mar 18, 2026
766959f
8371685: C2: Add flag to disable Loop Peeling
raneashay Mar 18, 2026
446fb20
8379015: Convert TraceNewOopMapGeneration to unified logging
coleenp Mar 18, 2026
20567e8
8380218: Refactor test/jdk/java/nio/charset TestNG tests to JUnit
Mar 18, 2026
b6de5ae
8379699: H3ConnectionPoolTest::testH2H3WithTwoAltSVC fails intermitte…
dfuch Mar 18, 2026
7d805e1
8380222: Refactor test/jdk/java/lang/Character TestNG tests to JUnit
naotoj Mar 18, 2026
625b83c
Merge branch 'sapmachine' into pr-jdk-27+14
TheRealMDoerr Mar 21, 2026
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
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion make/autoconf/basic_tools.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2026, 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 @@ -369,6 +369,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
IS_GNU_DATE=yes
else
AC_MSG_RESULT([no])
# Likely at the AIX provided version of the date utility here, which is not compatible
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
AC_MSG_ERROR([gnu date from AIX toolbox is required])
fi
IS_GNU_DATE=no
fi
AC_SUBST(IS_GNU_DATE)
Expand Down
8 changes: 7 additions & 1 deletion make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2026, 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 @@ -35,8 +35,14 @@ include ProcessMarkdown.gmk
include $(TOPDIR)/make/ToolsJdk.gmk

LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher

ifeq ($(call isTargetOs, aix), true)
ADD_PLATFORM_INCLUDE_DIR := -I$(TOPDIR)/src/java.base/aix/native/include
endif

LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
-I$(TOPDIR)/src/java.base/share/native/libjli \
$(ADD_PLATFORM_INCLUDE_DIR) \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
#
Expand Down
7 changes: 6 additions & 1 deletion make/hotspot/lib/JvmFlags.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2026, 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 @@ -43,10 +43,15 @@ JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
$(JVM_VARIANT_OUTPUTDIR)/gensrc
#

ifeq ($(call isTargetOs, aix), true)
ADD_PLATFORM_INCLUDE_DIR := -I$(TOPDIR)/src/java.base/aix/native/include
endif

JVM_CFLAGS_INCLUDES += \
$(patsubst %,-I%,$(JVM_SRC_DIRS)) \
-I$(TOPDIR)/src/hotspot/share/include \
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
$(ADD_PLATFORM_INCLUDE_DIR) \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-I$(TOPDIR)/src/java.base/share/native/libjimage \
Expand Down
35 changes: 2 additions & 33 deletions make/jdk/src/classes/build/tools/intpoly/FieldGen.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2026, 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 @@ -34,36 +34,6 @@

public class FieldGen {

static FieldParams Curve25519 = new FieldParams(
"IntegerPolynomial25519", 26, 10, 1, 255,
Arrays.asList(
new Term(0, -19)
),
Curve25519CrSequence(), simpleSmallCrSequence(10)
);

private static List<CarryReduce> Curve25519CrSequence() {
List<CarryReduce> result = new ArrayList<CarryReduce>();

// reduce(7,2)
result.add(new Reduce(17));
result.add(new Reduce(18));

// carry(8,2)
result.add(new Carry(8));
result.add(new Carry(9));

// reduce(0,7)
for (int i = 10; i < 17; i++) {
result.add(new Reduce(i));
}

// carry(0,9)
result.addAll(fullCarry(10));

return result;
}

static FieldParams Curve448 = new FieldParams(
"IntegerPolynomial448", 28, 16, 1, 448,
Arrays.asList(
Expand Down Expand Up @@ -224,8 +194,7 @@ private static List<CarryReduce> orderFieldSmallCrSequence(int numLimbs) {
}

static final FieldParams[] ALL_FIELDS = {
Curve25519, Curve448,
P256, P384, P521, O256, O384, O521, O25519, O448
Curve448, P256, P384, P521, O256, O384, O521, O25519, O448
};

public static class Term {
Expand Down
3 changes: 2 additions & 1 deletion make/modules/java.base/Launcher.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ ifeq ($(call isTargetOsType, unix), true)
CFLAGS := $(VERSION_CFLAGS), \
EXTRA_HEADER_DIRS := libjava, \
EXTRA_OBJECT_FILES := \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX) \
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc_errorcodes$(OBJ_SUFFIX), \
LD_SET_ORIGIN := false, \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
))
Expand Down
14 changes: 8 additions & 6 deletions make/modules/java.desktop/lib/AwtLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,16 @@ ifeq ($(call isTargetOs, windows), true)
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
endif

# This is the object file to provide the dladdr API, which is not
# part of AIX. It occurs several times in the jdk code base.
# Do not include it. When statically linking the java
# launcher with all JDK and VM static libraries, we use the
# --whole-archive linker option. The duplicate objects in different
# static libraries cause linking errors due to duplicate symbols.
ifeq ($(call isTargetOs, aix), true)
# This is the object file to provide the dladdr API, which is not
# part of AIX. It occurs several times in the jdk code base.
# Do not include it. When statically linking the java
# launcher with all JDK and VM static libraries, we use the
# --whole-archive linker option. The duplicate objects in different
# static libraries cause linking errors due to duplicate symbols.
LIBAWT_STATIC_EXCLUDE_OBJS := porting_aix.o

LIBAWT_CFLAGS += -I$(TOPDIR)/src/java.base/aix/native/include
endif

# -fgcse-after-reload improves performance of MaskFill in Java2D by 20% for
Expand Down
29 changes: 29 additions & 0 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -8024,6 +8024,21 @@ instruct membar_release_lock() %{
ins_pipe(pipe_serial);
%}

instruct membar_storeload() %{
match(MemBarStoreLoad);
ins_cost(VOLATILE_REF_COST*100);

format %{ "MEMBAR-store-load\n\t"
"dmb ish" %}

ins_encode %{
__ block_comment("membar_storeload");
__ membar(Assembler::StoreLoad);
%}

ins_pipe(pipe_serial);
%}

instruct unnecessary_membar_volatile() %{
predicate(unnecessary_volatile(n));
match(MemBarVolatile);
Expand Down Expand Up @@ -8053,6 +8068,20 @@ instruct membar_volatile() %{
ins_pipe(pipe_serial);
%}

instruct membar_full() %{
match(MemBarFull);
ins_cost(VOLATILE_REF_COST*100);

format %{ "membar_full\n\t"
"dmb ish" %}
ins_encode %{
__ block_comment("membar_full");
__ membar(Assembler::AnyAny);
%}

ins_pipe(pipe_serial);
%}

// ============================================================================
// Cast/Convert Instructions

Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(bool, CICompileOSR, true );
#endif // !COMPILER2
define_pd_global(bool, UseTypeProfile, false);
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);

// Ergonomics related flags
define_pd_global(bool, NeverActAsServerClassMachine, false);

define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed.

#endif // CPU_AARCH64_C2_GLOBALS_AARCH64_HPP
50 changes: 40 additions & 10 deletions src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Arm Limited. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -146,10 +146,10 @@ void DowncallLinker::StubGenerator::generate() {

bool should_save_return_value = !_needs_return_buffer;
RegSpiller out_reg_spiller(_output_registers);
int spill_offset = -1;
int out_spill_offset = -1;

if (should_save_return_value) {
spill_offset = 0;
out_spill_offset = 0;
// spill area can be shared with shadow space and out args,
// since they are only used before the call,
// and spill area is only used after.
Expand All @@ -174,6 +174,9 @@ void DowncallLinker::StubGenerator::generate() {
// FP-> | |
// |---------------------| = frame_bottom_offset = frame_size
// | (optional) |
// | in_reg_spiller area |
// |---------------------|
// | (optional) |
// | capture state buf |
// |---------------------| = StubLocations::CAPTURED_STATE_BUFFER
// | (optional) |
Expand All @@ -187,6 +190,19 @@ void DowncallLinker::StubGenerator::generate() {
GrowableArray<VMStorage> out_regs = ForeignGlobals::replace_place_holders(_input_registers, locs);
ArgumentShuffle arg_shuffle(filtered_java_regs, out_regs, shuffle_reg);

// Need to spill for state capturing runtime call.
// The area spilled into is distinct from the capture state buffer.
RegSpiller in_reg_spiller(out_regs);
int in_spill_offset = -1;
if (_captured_state_mask != 0) {
// The spill area cannot be shared with the out_spill since
// spilling needs to happen before the call. Allocate a new
// region in the stack for this spill space.
in_spill_offset = allocated_frame_size;
allocated_frame_size += in_reg_spiller.spill_size_bytes();
}


#ifndef PRODUCT
LogTarget(Trace, foreign, downcall) lt;
if (lt.is_enabled()) {
Expand Down Expand Up @@ -228,6 +244,20 @@ void DowncallLinker::StubGenerator::generate() {
arg_shuffle.generate(_masm, shuffle_reg, 0, _abi._shadow_space_bytes);
__ block_comment("} argument shuffle");

if (_captured_state_mask != 0) {
assert(in_spill_offset != -1, "must be");
__ block_comment("{ load initial thread local");
in_reg_spiller.generate_spill(_masm, in_spill_offset);

// Copy the contents of the capture state buffer into thread local
__ ldr(c_rarg0, Address(sp, locs.data_offset(StubLocations::CAPTURED_STATE_BUFFER)));
__ movw(c_rarg1, _captured_state_mask);
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state_pre), tmp1);

in_reg_spiller.generate_fill(_masm, in_spill_offset);
__ block_comment("} load initial thread local");
}

__ blr(as_Register(locs.get(StubLocations::TARGET_ADDRESS)));
// this call is assumed not to have killed rthread

Expand All @@ -254,15 +284,15 @@ void DowncallLinker::StubGenerator::generate() {
__ block_comment("{ save thread local");

if (should_save_return_value) {
out_reg_spiller.generate_spill(_masm, spill_offset);
out_reg_spiller.generate_spill(_masm, out_spill_offset);
}

__ ldr(c_rarg0, Address(sp, locs.data_offset(StubLocations::CAPTURED_STATE_BUFFER)));
__ movw(c_rarg1, _captured_state_mask);
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state), tmp1);
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state_post), tmp1);

if (should_save_return_value) {
out_reg_spiller.generate_fill(_masm, spill_offset);
out_reg_spiller.generate_fill(_masm, out_spill_offset);
}

__ block_comment("} save thread local");
Expand Down Expand Up @@ -321,7 +351,7 @@ void DowncallLinker::StubGenerator::generate() {

if (should_save_return_value) {
// Need to save the native result registers around any runtime calls.
out_reg_spiller.generate_spill(_masm, spill_offset);
out_reg_spiller.generate_spill(_masm, out_spill_offset);
}

__ mov(c_rarg0, rthread);
Expand All @@ -330,7 +360,7 @@ void DowncallLinker::StubGenerator::generate() {
__ blr(tmp1);

if (should_save_return_value) {
out_reg_spiller.generate_fill(_masm, spill_offset);
out_reg_spiller.generate_fill(_masm, out_spill_offset);
}

__ b(L_after_safepoint_poll);
Expand All @@ -342,13 +372,13 @@ void DowncallLinker::StubGenerator::generate() {
__ bind(L_reguard);

if (should_save_return_value) {
out_reg_spiller.generate_spill(_masm, spill_offset);
out_reg_spiller.generate_spill(_masm, out_spill_offset);
}

__ rt_call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages), tmp1);

if (should_save_return_value) {
out_reg_spiller.generate_fill(_masm, spill_offset);
out_reg_spiller.generate_fill(_masm, out_spill_offset);
}

__ b(L_after_reguard);
Expand Down
9 changes: 6 additions & 3 deletions src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -245,8 +245,8 @@ inline bool frame::equal(frame other) const {

// Return unique id for this frame. The id must have a value where we can distinguish
// identity and younger/older relationship. null represents an invalid (incomparable)
// frame.
inline intptr_t* frame::id(void) const { return unextended_sp(); }
// frame. Should not be called for heap frames.
inline intptr_t* frame::id(void) const { return real_fp(); }

// Return true if the frame is older (less recent activation) than the frame represented by id
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != nullptr && id != nullptr, "null frame id");
Expand Down Expand Up @@ -412,6 +412,9 @@ inline frame frame::sender(RegisterMap* map) const {
StackWatermarkSet::on_iteration(map->thread(), result);
}

// Calling frame::id() is currently not supported for heap frames.
assert(result._on_heap || this->_on_heap || result.is_older(this->id()), "Must be");

return result;
}

Expand Down
Loading
Loading