Skip to content

Commit 0c0f45b

Browse files
Merge tag 'jdk-26+14' into labsjdk/adopt-jdk-26+14-master
Added tag jdk-26+14 for changeset ab9f70d
2 parents 2d73229 + ab9f70d commit 0c0f45b

File tree

889 files changed

+14350
-4688
lines changed

Some content is hidden

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

889 files changed

+14350
-4688
lines changed

.github/workflows/build-cross-compile.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,33 @@ jobs:
6464
gnu-arch: aarch64
6565
debian-arch: arm64
6666
debian-repository: https://httpredir.debian.org/debian/
67-
debian-version: bookworm
67+
debian-version: trixie
6868
tolerate-sysroot-errors: false
6969
- target-cpu: arm
7070
gnu-arch: arm
7171
debian-arch: armhf
7272
debian-repository: https://httpredir.debian.org/debian/
73-
debian-version: bookworm
73+
debian-version: trixie
7474
tolerate-sysroot-errors: false
7575
gnu-abi: eabihf
7676
- target-cpu: s390x
7777
gnu-arch: s390x
7878
debian-arch: s390x
7979
debian-repository: https://httpredir.debian.org/debian/
80-
debian-version: bookworm
80+
debian-version: trixie
8181
tolerate-sysroot-errors: false
8282
- target-cpu: ppc64le
8383
gnu-arch: powerpc64le
8484
debian-arch: ppc64el
8585
debian-repository: https://httpredir.debian.org/debian/
86-
debian-version: bookworm
86+
debian-version: trixie
8787
tolerate-sysroot-errors: false
8888
- target-cpu: riscv64
8989
gnu-arch: riscv64
9090
debian-arch: riscv64
9191
debian-repository: https://httpredir.debian.org/debian/
92-
debian-version: sid
93-
tolerate-sysroot-errors: true
92+
debian-version: trixie
93+
tolerate-sysroot-errors: false
9494

9595
steps:
9696
- name: 'Checkout the JDK source'

doc/hotspot-style.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ <h3 id="factoring-and-class-design">Factoring and Class Design</h3>
209209
attribute, the change should be done with a "setter" accessor matched to
210210
the simple "getter".</p></li>
211211
</ul>
212+
<h4 id="conventions-for-lock-free-code">Conventions for Lock-free
213+
Code</h4>
214+
<p>Sometimes variables are accessed concurrently without appropriate
215+
synchronization context, such as a held mutex or at a safepoint. In such
216+
cases the variable should be declared <code>volatile</code> and it
217+
should NOT be accessed as a normal C++ lvalue. Rather, access should be
218+
performed via functions from <code>Atomic</code>, such as
219+
<code>Atomic::load</code>, <code>Atomic::store</code>, etc.</p>
220+
<p>This special formulation makes it more clear to maintainers that the
221+
variable is accessed concurrently in a lock-free manner.</p>
212222
<h3 id="source-files">Source Files</h3>
213223
<ul>
214224
<li><p>All source files must have a globally unique basename. The build

doc/hotspot-style.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ lines of code. Name what you must repeat.
135135
change should be done with a "setter" accessor matched to the simple
136136
"getter".
137137

138+
#### Conventions for Lock-free Code
139+
140+
Sometimes variables are accessed concurrently without appropriate synchronization
141+
context, such as a held mutex or at a safepoint. In such cases the variable should
142+
be declared `volatile` and it should NOT be accessed as a normal C++ lvalue. Rather,
143+
access should be performed via functions from `Atomic`, such as `Atomic::load`,
144+
`Atomic::store`, etc.
145+
146+
This special formulation makes it more clear to maintainers that the variable is
147+
accessed concurrently in a lock-free manner.
148+
138149
### Source Files
139150

140151
* All source files must have a globally unique basename. The build

doc/testing.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ <h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
398398
<h4 id="jobs">JOBS</h4>
399399
<p>Currently only applies to JTReg.</p>
400400
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
401-
<p>Currently only applies to JTReg.</p>
401+
<p>Currently only applies to <a href="#timeout_factor-1">JTReg
402+
-timeoutFactor</a>.</p>
402403
<h4 id="java_options">JAVA_OPTIONS</h4>
403404
<p>Applies to JTReg, GTest and Micro.</p>
404405
<h4 id="vm_options">VM_OPTIONS</h4>
@@ -444,8 +445,12 @@ <h4 id="jobs-1">JOBS</h4>
444445
<em>number of CPU cores/2</em>, but never more than <em>memory size in
445446
GB/2</em>.</p>
446447
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
447-
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
448-
<p>Defaults to 4.</p>
448+
<p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
449+
itself (<code>-timeoutFactor</code>). Also, some test cases that
450+
programmatically wait a certain amount of time will apply this factor.
451+
If we run in forced compilation mode (<code>-Xcomp</code>), the build
452+
system will automatically adjust this factor to compensate for less
453+
performance. Defaults to 1.</p>
449454
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
450455
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
451456
default value is 0. This is only valid if the failure handler is

doc/testing.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Currently only applies to JTReg.
324324

325325
#### TIMEOUT_FACTOR
326326

327-
Currently only applies to JTReg.
327+
Currently only applies to [JTReg -timeoutFactor](#timeout_factor-1).
328328

329329
#### JAVA_OPTIONS
330330

@@ -383,9 +383,11 @@ never more than *memory size in GB/2*.
383383

384384
#### TIMEOUT_FACTOR
385385

386-
The timeout factor (`-timeoutFactor`).
387-
388-
Defaults to 4.
386+
The `TIMEOUT_FACTOR` is forwarded to JTReg framework itself
387+
(`-timeoutFactor`). Also, some test cases that programmatically wait a
388+
certain amount of time will apply this factor. If we run in forced
389+
compilation mode (`-Xcomp`), the build system will automatically
390+
adjust this factor to compensate for less performance. Defaults to 1.
389391

390392
#### FAILURE_HANDLER_TIMEOUT
391393

make/RunTests.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,8 @@ define SetupRunJtregTestBody
946946
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
947947

948948
JTREG_AUTO_PROBLEM_LISTS :=
949-
JTREG_AUTO_TIMEOUT_FACTOR := 4
949+
# Please reach consensus before changing this. It was not easy changing it to a `1`.
950+
JTREG_AUTO_TIMEOUT_FACTOR := 1
950951

951952
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
952953
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt

make/autoconf/configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
221221
# LeakSanitizer
222222
JDKOPT_SETUP_LEAK_SANITIZER
223223

224+
# Setup static analyzer
225+
JDKOPT_SETUP_STATIC_ANALYZER
226+
224227
# Fallback linker
225228
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
226229
JDKOPT_SETUP_FALLBACK_LINKER

make/autoconf/flags.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,16 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
320320
[
321321
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
322322
CC_OUT_OPTION=-Fo
323+
if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
324+
AS_NON_ASM_EXTENSION_OPTION=-Ta
325+
fi
323326
else
324327
# The option used to specify the target .o,.a or .so file.
325328
# When compiling, how to specify the to be created object file.
326329
CC_OUT_OPTION='-o$(SPACE)'
327330
fi
328331
AC_SUBST(CC_OUT_OPTION)
332+
AC_SUBST(AS_NON_ASM_EXTENSION_OPTION)
329333
330334
# Generate make dependency files
331335
if test "x$TOOLCHAIN_TYPE" = xgcc; then

make/autoconf/jdk-options.m4

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
479479
AC_SUBST(ASAN_ENABLED)
480480
])
481481

482+
################################################################################
483+
#
484+
# Static analyzer
485+
#
486+
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER],
487+
[
488+
UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED,
489+
DESC: [enable the GCC static analyzer],
490+
CHECK_AVAILABLE: [
491+
AC_MSG_CHECKING([if static analyzer is available])
492+
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
493+
AC_MSG_RESULT([yes])
494+
else
495+
AC_MSG_RESULT([no])
496+
AVAILABLE=false
497+
fi
498+
],
499+
IF_ENABLED: [
500+
STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak"
501+
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS"
502+
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS"
503+
])
504+
AC_SUBST(STATIC_ANALYZER_ENABLED)
505+
])
506+
482507
################################################################################
483508
#
484509
# LeakSanitizer

make/autoconf/spec.gmk.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
492492
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
493493

494494
CC_OUT_OPTION := @CC_OUT_OPTION@
495+
AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@
495496

496497
# Flags used for overriding the default opt setting for a C/C++ source file.
497498
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@

0 commit comments

Comments
 (0)