Skip to content

Merge to tag jdk-26+3 #1999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 96 commits into
base: sapmachine
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
5886ef7
8359182: Use @requires instead of SkippedException for MaxPath.java
Jun 12, 2025
7b7136b
8359181: Error messages generated by configure --help after 8301197
Jun 12, 2025
3e0ef83
8359083: Test jdkCheckHtml.java should report SkippedException rather…
Jun 12, 2025
3f0fef2
8359135: New test TestCPUTimeSampleThrottling fails intermittently
parttimenerd Jun 12, 2025
65e63b6
8359218: RISC-V: Only enable CRC32 intrinsic when AvoidUnalignedAcces…
Jun 12, 2025
b6ec93b
8359121: C2: Region added by vectorizedMismatch intrinsic can survive…
marc-chevalier Jun 12, 2025
91fdd72
8355726: LinkedBlockingDeque fixes and improvements
kabutz Jun 12, 2025
e5ce5c5
8357959: (bf) ByteBuffer.allocateDirect initialization can result in …
Jun 12, 2025
e18277b
8352075: Perf regression accessing fields
Jun 12, 2025
b85fe02
8358600: Template-Framework Library: Template for TestFramework test …
eme64 Jun 12, 2025
dd68829
8347273: C2: VerifyIterativeGVN for Ideal and Identity
eme64 Jun 12, 2025
fae9c7a
8351661: NMT: VMATree should support separate call-stacks for reserve…
Jun 12, 2025
1fcede0
8358334: C2/Shenandoah: incorrect execution with Unsafe
rwestrel Jun 12, 2025
3c53057
8359232: [PPC64] C2: Clean up ppc.ad: add instr sizes, remove comments
Jun 12, 2025
8d33ea7
8354646: java.awt.TextField allows to identify the spaces in a passwo…
mickleness Jun 12, 2025
610a18e
8358688: HttpClient: Simplify file streaming in RequestPublishers.Fil…
Jun 12, 2025
0ef0986
8359168: Revert stdin.encoding usage in test/hotspot/jtreg/vmTestbase…
Jun 12, 2025
9982995
8358819: The first year is not displayed correctly in Japanese Calendar
naotoj Jun 12, 2025
db7af2b
8349550: Improve SASL random usage
koushikthirupattur Jun 12, 2025
66535fe
8358701: Remove misleading javax.management.remote API doc wording ab…
kevinjwalls Jun 12, 2025
0dd7c69
8357286: (bf) Remove obsolete instanceof checks in CharBuffer.append
Jun 12, 2025
523a4ef
8358970: CounterMonitorMBean.getDerivedGaugeTimeStamp() JavaDoc incor…
kevinjwalls Jun 12, 2025
991097b
8315066: Add unsigned bounds and known bits to TypeInt/Long
Jun 13, 2025
9aeacf2
8358958: (aio) AsynchronousByteChannel.read/write should throw IAE if…
Jun 13, 2025
6749c62
8358772: Template-Framework Library: Primitive Types
eme64 Jun 13, 2025
ed39e17
8359200: Memory corruption in MStack::push
TobiHartmann Jun 13, 2025
a8b4284
8359293: Make TestNoNULL extensible
Jun 13, 2025
032ead1
8358483: G1: Remove G1HeapRegionManager::num_available_regions
albertnetymk Jun 13, 2025
a0fb35c
8359272: Several vmTestbase/compact tests timed out on large memory m…
Jun 13, 2025
e7f63ba
8359327: Incorrect AVX3Threshold results into code buffer overflows o…
Jun 13, 2025
3a18872
8359225: Remove unused test/jdk/javax/script/MyContext.java
Jun 13, 2025
ead4529
8340182: Java HttpClient does not follow default retry limit of 3 ret…
p-nima Jun 13, 2025
25b22c9
8358602: JFR: Annotations in jdk.jfr package should not use "not null…
egahlin Jun 13, 2025
e8ef93a
8357782: JVM JIT Causes Static Initialization Order Issue
mhaessig Jun 13, 2025
b5334fe
8314180: Disable XPath in XML Signatures
seanjmullan Jun 13, 2025
b4c4496
8354196: C2: reorder and capitalize phase definition
mhaessig Jun 13, 2025
57cabc6
8359364: java/net/URL/EarlyOrDelayedParsing test fails intermittently
dfuch Jun 13, 2025
417f8ec
8359224: G1: Incorrect size unit in logging of G1CollectedHeap::alloc…
albertnetymk Jun 13, 2025
78b1360
8359127: Amend java/nio/channels/DatagramChannel/PromiscuousIPv6.java…
dermotb Jun 13, 2025
366650a
8355556: JVM crash because archived method handle intrinsics are not …
iklam Jun 13, 2025
12a0dd0
8358738: AOT cache created without graal jit should not be used with …
Jun 13, 2025
ee35f63
8359373: Split stubgen initial blob into pre and post-universe blobs
adinn Jun 13, 2025
b3f5608
8358094: Test vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescr…
Jun 13, 2025
0e725c6
8354447: Missing test for retroactive @SuppressWarnings("dangling-doc…
archiecobbs Jun 13, 2025
26848a7
8358804: Improve the API Note of BigDecimal.valueOf(double)
rgiulietti Jun 14, 2025
1a01839
8359105: RISC-V: No need for acquire fence in safepoint poll during J…
Jun 16, 2025
6fe9143
8358532: JFileChooser in GTK L&F still displays HTML filename
Jun 16, 2025
534a860
8358129: compiler/startup/StartupOutput.java runs into out of memory …
dafedafe Jun 16, 2025
eacfcd8
8357995: Use "stdin.encoding" for reading System.in with InputStreamR…
Jun 16, 2025
d8c3533
8357816: Add test from JDK-8350576
benoitmaillard Jun 16, 2025
8416ca3
8346982: Remove JMX javadoc duplication that was in place due to JDK-…
kevinjwalls Jun 16, 2025
79497ef
8348574: Simplify c1/c2_globals inclusions
Jun 16, 2025
fedd0a0
8359248: JFR: Help text for-XX:StartFlightRecording:report-on-exit sh…
egahlin Jun 16, 2025
9d06057
8358892: RISC-V: jvm crash when running dacapo sunflow after JDK-8352504
Jun 16, 2025
59460ff
8359664: G1: Remove default arg for pretouch_workers of G1CollectedHe…
albertnetymk Jun 16, 2025
9652ae9
8347114: JMXServiceURL should require an explicit protocol
kevinjwalls Jun 16, 2025
6e390ef
8358690: Some initialization code asks for AOT cache status way too e…
Jun 16, 2025
06d804a
8338140: (str) Add notes to String.trim and String.isEmpty pointing t…
Jun 16, 2025
2f2acb2
8359593: JFR: Instrumentation of java.lang.String corrupts recording
egahlin Jun 16, 2025
e57a214
8359242: JFR: Missing help text for method trace and timing
egahlin Jun 16, 2025
9a1c1f2
8357847: (ch) AsynchronousFileChannel implementations should support …
Jun 16, 2025
e55ddab
8359223: HttpClient: Remove leftovers from the SecurityManager cleanup
Jun 16, 2025
a16d235
8359402: Test CloseDescriptors.java should throw SkippedException whe…
Jun 17, 2025
ff75f76
8351645: C2: Assertion failures in Expand/CompressBits idealizations …
Jun 17, 2025
f7cd3fa
8332623: Remove setTTL()/getTTL() methods from DatagramSocketImpl/Mul…
jaikiran Jun 17, 2025
a082082
8354650: [PPC64] Try to reduce register definitions
Jun 17, 2025
f62f117
8359701: G1: Move heap expansion time tracking of G1CollectedHeap:exp…
albertnetymk Jun 17, 2025
c1deb9e
8356556: AArch64: No need for acquire fence in safepoint poll in FFM
toxaart Jun 17, 2025
51877f5
8359207: Remove runtime/signal/TestSigusr2.java since it is always sk…
Jun 17, 2025
21b72de
8357862: Java argument file is parsed unexpectedly with trailing comment
sormuras Jun 17, 2025
53a83d1
8357799: Improve instructions for JFileChooser/HTMLFileName.java
aivanov-jdk Jun 17, 2025
9607021
8359646: C1 crash in AOTCodeAddressTable::add_C_string
Jun 17, 2025
49a82d8
8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor ext…
dermotb Jun 17, 2025
164cae4
8359733: UnProblemList serviceability/jvmti/vthread/SuspendWithInterr…
Jun 17, 2025
afa52e4
8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead …
tstuefe Jun 17, 2025
8c760e7
8359418: Test "javax/swing/text/GlyphView/bug4188841.java" failed bec…
lawrence-andrew Jun 17, 2025
382f870
8357976: GenShen crash in swap_card_tables: Should be clean
Jun 17, 2025
2f63d3a
7116990: (spec) Socket.connect(addr,timeout) not clear if IOException…
jaikiran Jun 18, 2025
1130c1b
6798061: The removal of System.out.println from KeyboardManager
prsadhuk Jun 18, 2025
2b94b70
8359428: Test 'javax/swing/JTabbedPane/bug4499556.java' failed becaus…
prsadhuk Jun 18, 2025
5726606
8359709: java.net.HttpURLConnection sends unexpected "Host" request h…
jaikiran Jun 18, 2025
cabd7c1
8356897: Update NSS library to 3.111
Jun 18, 2025
f07f5ce
8359067: Fix typo in DelayScheduler.java
He-Pin Jun 18, 2025
547ce03
8337217: Port VirtualMemoryTracker to use VMATree
Jun 18, 2025
ba32b78
8358329: AArch64: emit direct branches in static stubs for small code…
Jun 18, 2025
cf78925
8358891: Remove the PerfDataSamplingIntervalFunc code
caspernorrbin Jun 18, 2025
42d3604
8359923: Const accessors for the Deferred class
jsikstro Jun 18, 2025
984d7f9
8359895: JFR: method-timing view doesn't work
egahlin Jun 18, 2025
b7fcd0b
8359889: java/awt/MenuItem/SetLabelTest.java inadvertently triggers c…
Jun 18, 2025
7bc0d82
8359227: Code cache/heap size options should be size_t
Jun 18, 2025
b52af18
8359386: Fix incorrect value for max_size of C2CodeStub when APX is used
Jun 18, 2025
982064e
8359167: Remove unused test/hotspot/jtreg/vmTestbase/nsk/share/jpda/B…
plummercj Jun 18, 2025
5a62e99
8357686: Remove unnecessary Map.get from AWTAutoShutdown.unregisterPeer
Jun 18, 2025
23e1e2f
8359180: Apply java.io.Serial annotations in java.instrument
mrserb Jun 18, 2025
08b1fa4
8359972: Problem list TestStaticCallStub until JDK-8359963 is fixed
TobiHartmann Jun 19, 2025
d3c007b
Merge branch 'sapmachine' into pr-jdk-26+3
RealCLanger Jun 23, 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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions make/autoconf/configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 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 @@ -366,7 +366,7 @@ EOT

# Print additional help, e.g. a list of toolchains and JVM features.
# This must be done by the autoconf script.
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )

cat <<EOT

Expand Down
34 changes: 23 additions & 11 deletions make/jdk/src/classes/build/tools/cldrconverter/Bundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ private void handleDateTimeFormatPatterns(String[] patternKeys, Map<String, Obje
if (pattern != null) {
// Perform date-time format pattern conversion which is
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter);
dateTimePatterns.add(i, transPattern);
// Additionally, perform SDF specific date-time format pattern conversion
sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter));
sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter));
} else {
dateTimePatterns.add(i, null);
sdfPatterns.add(i, null);
Expand All @@ -568,7 +568,7 @@ private void handleDateTimeFormatPatterns(String[] patternKeys, Map<String, Obje
}
}

private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) {
private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) {
String pattern = cldrFormat;
int length = pattern.length();
boolean inQuote = false;
Expand All @@ -587,7 +587,7 @@ private String translateDateFormatLetters(CalendarType calendarType, String cldr
if (nextc == '\'') {
i++;
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
Expand All @@ -597,7 +597,7 @@ private String translateDateFormatLetters(CalendarType calendarType, String cldr
}
if (!inQuote) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
Expand All @@ -614,7 +614,7 @@ private String translateDateFormatLetters(CalendarType calendarType, String cldr
}
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
Expand All @@ -627,7 +627,7 @@ private String translateDateFormatLetters(CalendarType calendarType, String cldr
count++;
continue;
}
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = c;
count = 1;
}
Expand All @@ -637,7 +637,7 @@ private String translateDateFormatLetters(CalendarType calendarType, String cldr
}

if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
}
if (cldrFormat.contentEquals(jrePattern)) {
return cldrFormat;
Expand All @@ -661,7 +661,7 @@ private String toMetaZoneKey(String tzKey) {
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
* for date-time formatting.
*/
private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'u':
case 'U':
Expand All @@ -683,7 +683,7 @@ private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLe
* Perform a conversion of CLDR date-time format pattern letter which is
* specific to the SimpleDateFormat.
*/
private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'G':
if (calendarType != CalendarType.GREGORIAN) {
Expand Down Expand Up @@ -722,6 +722,17 @@ private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int co
appendN('z', count, sb);
break;

case 'y':
// If the style is FULL/LONG for a Japanese Calendar, make the
// count == 4 for Gan-nen
if (calendarType == CalendarType.JAPANESE &&
(patternKey.contains("full-") ||
patternKey.contains("long-"))) {
count = 4;
}
appendN(cldrLetter, count, sb);
break;

case 'Z':
if (count == 4 || count == 5) {
sb.append("XXX");
Expand Down Expand Up @@ -767,6 +778,7 @@ private void handleSkeletonPatterns(Map<String, Object> myMap, CalendarType cale
.collect(Collectors.toMap(
e -> calendarPrefix + e.getKey(),
e -> translateDateFormatLetters(calendarType,
e.getKey(),
(String)e.getValue(),
this::convertDateTimePatternLetter)
))
Expand All @@ -775,7 +787,7 @@ private void handleSkeletonPatterns(Map<String, Object> myMap, CalendarType cale

@FunctionalInterface
private interface ConvertDateTimeLetters {
void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb);
void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion make/test/JtregNativeJdk.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
libExplicitAttach.c libImplicitAttach.c \
exelauncher.c
exelauncher.c libFDLeaker.c exeFDLeakTester.c

#SapMachine 2024-06-12: Exclude libCreateNewProcessGroupOnSpawnTest.c from native compilation on Windows
BUILD_JDK_JTREG_EXCLUDE += libCreateNewProcessGroupOnSpawnTest.c
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ void MachEpilogNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
code_stub = &stub->entry();
}
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {

code_stub->set_safepoint_offset(__ offset());
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */);
__ ret(lr);
}

Expand Down
18 changes: 9 additions & 9 deletions src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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 @@ -43,15 +43,15 @@ define_pd_global(intx, CompileThreshold, 1500 );

define_pd_global(intx, OnStackReplacePercentage, 933 );
define_pd_global(intx, NewSizeThreadIncrease, 4*K );
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M );
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
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(uint64_t,MaxRAM, 1ULL*G);
define_pd_global(bool, CICompileOSR, true );
Expand Down
18 changes: 9 additions & 9 deletions src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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 @@ -51,8 +51,8 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);

// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM, 128ULL*G);
Expand All @@ -69,12 +69,12 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8);
define_pd_global(bool, IdealizeClearArrayNode, true);

define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
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);
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ void CompiledDirectCall::set_to_interpreted(const methodHandle& callee, address
= nativeMovConstReg_at(stub + NativeInstruction::instruction_size);

#ifdef ASSERT
NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
NativeJump* jump = MacroAssembler::codestub_branch_needs_far_jump()
? nativeGeneralJump_at(method_holder->next_instruction_address())
: nativeJump_at(method_holder->next_instruction_address());
verify_mt_safe(callee, entry, method_holder, jump);
#endif

// Update stub.
method_holder->set_data((intptr_t)callee());
NativeGeneralJump::insert_unconditional(method_holder->next_instruction_address(), entry);
MacroAssembler::pd_patch_instruction(method_holder->next_instruction_address(), entry);
ICache::invalidate_range(stub, to_interp_stub_size());
// Update jump to call.
set_destination_mt_safe(stub);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void DowncallLinker::StubGenerator::generate() {

__ verify_sve_vector_length(tmp1);

__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */, tmp1);
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */, tmp1);

__ ldrw(tmp1, Address(rthread, JavaThread::suspend_flags_offset()));
__ cbnzw(tmp1, L_safepoint_poll_slow_path);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/globals_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls

define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);

define_pd_global(uintx, CodeCacheSegmentSize, 64);
define_pd_global(size_t, CodeCacheSegmentSize, 64);
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// the stack, will call InterpreterRuntime::at_unwind.
Label slow_path;
Label fast_path;
safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
br(Assembler::AL, fast_path);
bind(slow_path);
push(state);
Expand Down
21 changes: 12 additions & 9 deletions src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,8 @@ address MacroAssembler::target_addr_for_insn_or_null(address insn_addr, unsigned
return MacroAssembler::target_addr_for_insn(insn_addr, insn);
}

void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp) {
if (acquire) {
lea(tmp, Address(rthread, JavaThread::polling_word_offset()));
ldar(tmp, tmp);
} else {
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
}
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp) {
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
if (at_return) {
// Note that when in_nmethod is set, the stack pointer is incremented before the poll. Therefore,
// we may safely use the sp instead to perform the stack watermark check.
Expand Down Expand Up @@ -989,11 +984,19 @@ void MacroAssembler::emit_static_call_stub() {
mov_metadata(rmethod, nullptr);

// Jump to the entry point of the c2i stub.
movptr(rscratch1, 0);
br(rscratch1);
if (codestub_branch_needs_far_jump()) {
movptr(rscratch1, 0);
br(rscratch1);
} else {
b(pc());
}
}

int MacroAssembler::static_call_stub_size() {
if (!codestub_branch_needs_far_jump()) {
// isb; movk; movz; movz; b
return 5 * NativeInstruction::instruction_size;
}
// isb; movk; movz; movz; movk; movz; movz; br
return 8 * NativeInstruction::instruction_size;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MacroAssembler: public Assembler {
virtual void check_and_handle_popframe(Register java_thread);
virtual void check_and_handle_earlyret(Register java_thread);

void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp = rscratch1);
void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp = rscratch1);
void rt_call(address dest, Register tmp = rscratch1);

// Load Effective Address
Expand Down
12 changes: 0 additions & 12 deletions src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,18 +386,6 @@ void NativeJump::patch_verified_entry(address entry, address verified_entry, add

void NativeGeneralJump::verify() { }

void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
NativeGeneralJump* n_jump = (NativeGeneralJump*)code_pos;

CodeBuffer cb(code_pos, instruction_size);
MacroAssembler a(&cb);

a.movptr(rscratch1, (uintptr_t)entry);
a.br(rscratch1);

ICache::invalidate_range(code_pos, instruction_size);
}

// MT-safe patching of a long jump instruction.
void NativeGeneralJump::replace_mt_safe(address instr_addr, address code_buffer) {
ShouldNotCallThis();
Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Red Hat Inc. 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 @@ -383,7 +383,6 @@ class NativeGeneralJump: public NativeJump {
address jump_destination() const;
void set_jump_destination(address dest);

static void insert_unconditional(address code_pos, address entry);
static void replace_mt_safe(address instr_addr, address code_buffer);
static void verify();
};
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Check for safepoint operation in progress and/or pending suspend requests.
{
// No need for acquire as Java threads always disarm themselves.
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */);
__ ldrw(rscratch1, Address(rthread, JavaThread::suspend_flags_offset()));
__ cbnzw(rscratch1, safepoint_in_progress);
__ bind(safepoint_in_progress_done);
Expand Down
7 changes: 7 additions & 0 deletions src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
#ifndef CPU_AARCH64_STUBDECLARATIONS_HPP
#define CPU_AARCH64_STUBDECLARATIONS_HPP

#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \


#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
Expand Down
Loading
Loading