Skip to content

Commit 79e7029

Browse files
[GR-68961] Merge in tag jdk-26+12
PullRequest: labsjdk-ce/201
2 parents f7bb5a1 + 3a9f951 commit 79e7029

File tree

469 files changed

+8605
-4739
lines changed

Some content is hidden

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

469 files changed

+8605
-4739
lines changed

bin/idea.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
125125
VCS_TYPE="hg4idea"
126126
fi
127127

128-
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
128+
# Git worktrees use a '.git' file rather than directory, so test both.
129+
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
129130
VCS_TYPE="Git"
130131
fi
131132

doc/building.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,10 +1451,10 @@ <h4 id="using-openjdk-devkits">Using OpenJDK Devkits</h4>
14511451
easily be used together with the <code>--with-devkit</code> configure
14521452
option to cross compile the JDK. On Linux/x86_64, the following
14531453
command:</p>
1454-
<pre><code>bash configure --with-devkit=&lt;devkit-path&gt; --openjdk-target=ppc64-linux-gnu &amp;&amp; make</code></pre>
1455-
<p>will configure and build the JDK for Linux/ppc64 assuming that
1456-
<code>&lt;devkit-path&gt;</code> points to a Linux/x86_64 to Linux/ppc64
1457-
devkit.</p>
1454+
<pre><code>bash configure --with-devkit=&lt;devkit-path&gt; --openjdk-target=ppc64le-linux-gnu &amp;&amp; make</code></pre>
1455+
<p>will configure and build the JDK for Linux/ppc64le assuming that
1456+
<code>&lt;devkit-path&gt;</code> points to a Linux/x86_64 to
1457+
Linux/ppc64le devkit.</p>
14581458
<p>Devkits can be created from the <code>make/devkit</code> directory by
14591459
executing:</p>
14601460
<pre><code>make [ TARGETS=&quot;&lt;TARGET_TRIPLET&gt;+&quot; ] [ BASE_OS=&lt;OS&gt; ] [ BASE_OS_VERSION=&lt;VER&gt; ]</code></pre>
@@ -1481,10 +1481,10 @@ <h4 id="using-openjdk-devkits">Using OpenJDK Devkits</h4>
14811481
<td>arm-linux-gnueabihf</td>
14821482
</tr>
14831483
<tr class="even">
1484-
<td>ppc64-linux-gnu</td>
1484+
<td>ppc64le-linux-gnu</td>
14851485
</tr>
14861486
<tr class="odd">
1487-
<td>ppc64le-linux-gnu</td>
1487+
<td>riscv64-linux-gnu</td>
14881488
</tr>
14891489
<tr class="even">
14901490
<td>s390x-linux-gnu</td>

doc/building.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,11 +1258,11 @@ toolchain and a sysroot environment which can easily be used together with the
12581258
following command:
12591259

12601260
```
1261-
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
1261+
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make
12621262
```
12631263

1264-
will configure and build the JDK for Linux/ppc64 assuming that `<devkit-path>`
1265-
points to a Linux/x86_64 to Linux/ppc64 devkit.
1264+
will configure and build the JDK for Linux/ppc64le assuming that `<devkit-path>`
1265+
points to a Linux/x86_64 to Linux/ppc64le devkit.
12661266

12671267
Devkits can be created from the `make/devkit` directory by executing:
12681268

@@ -1281,8 +1281,8 @@ at least the following targets are known to work:
12811281
| x86_64-linux-gnu |
12821282
| aarch64-linux-gnu |
12831283
| arm-linux-gnueabihf |
1284-
| ppc64-linux-gnu |
12851284
| ppc64le-linux-gnu |
1285+
| riscv64-linux-gnu |
12861286
| s390x-linux-gnu |
12871287

12881288
`BASE_OS` must be one of `OL` for Oracle Enterprise Linux or `Fedora`. If the

doc/starting-next-release.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
div.columns{display: flex; gap: min(4vw, 1.5em);}
1212
div.column{flex: auto; overflow-x: auto;}
1313
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
14-
/* The extra [class] is a hack that increases specificity enough to
15-
override a similar rule in reveal.js */
16-
ul.task-list[class]{list-style: none;}
14+
ul.task-list{list-style: none;}
1715
ul.task-list li input[type="checkbox"] {
18-
font-size: inherit;
1916
width: 0.8em;
2017
margin: 0 0.8em 0.2em -1.6em;
2118
vertical-align: middle;

doc/testing.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ <h1 class="title">Testing the JDK</h1>
7272
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
7373
locale</a></li>
7474
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
75-
</ul></li>
7675
<li><a href="#testing-ahead-of-time-optimizations"
77-
id="toc-testing-ahead-of-time-optimizations">### Testing Ahead-of-time
78-
Optimizations</a>
79-
<ul>
76+
id="toc-testing-ahead-of-time-optimizations">Testing Ahead-of-time
77+
Optimizations</a></li>
8078
<li><a href="#testing-with-alternative-security-providers"
8179
id="toc-testing-with-alternative-security-providers">Testing with
8280
alternative security providers</a></li>
@@ -435,6 +433,9 @@ <h4 id="jcov_diff_changeset">JCOV_DIFF_CHANGESET</h4>
435433
<p>The report is stored in
436434
<code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code>
437435
file.</p>
436+
<h4 id="aot_jdk">AOT_JDK</h4>
437+
<p>See <a href="#testing-ahead-of-time-optimizations">Testing
438+
Ahead-of-time optimizations</a>.</p>
438439
<h3 id="jtreg-keywords">JTReg keywords</h3>
439440
<h4 id="jobs-1">JOBS</h4>
440441
<p>The test concurrency (<code>-concurrency</code>).</p>
@@ -457,6 +458,12 @@ <h4 id="test_thread_factory">TEST_THREAD_FACTORY</h4>
457458
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
458459
compiled during the test image build. The implementation of the Virtual
459460
class creates a new virtual thread for executing each test class.</p>
461+
<h4 id="jvmti_stress_agent">JVMTI_STRESS_AGENT</h4>
462+
<p>Executes JTReg tests with JVM TI stress agent. The stress agent is
463+
the part of test library and located in
464+
<code>test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp</code>. The
465+
value of this argument is set as JVM TI agent options. This mode uses
466+
ProblemList-jvmti-stress-agent.txt as an additional exclude list.</p>
460467
<h4 id="test_mode">TEST_MODE</h4>
461468
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
462469
<p>Defaults to <code>agentvm</code>.</p>
@@ -556,6 +563,12 @@ <h4 id="results_format">RESULTS_FORMAT</h4>
556563
same values as <code>-rff</code>, i.e., <code>text</code>,
557564
<code>csv</code>, <code>scsv</code>, <code>json</code>, or
558565
<code>latex</code>.</p>
566+
<h4 id="test_jdk">TEST_JDK</h4>
567+
<p>The path to the JDK that will be used to run the benchmarks.</p>
568+
<p>Defaults to <code>build/&lt;CONF-NAME&gt;/jdk</code>.</p>
569+
<h4 id="benchmarks_jar">BENCHMARKS_JAR</h4>
570+
<p>The path to the JAR containing the benchmarks.</p>
571+
<p>Defaults to <code>test/micro/benchmarks.jar</code>.</p>
559572
<h4 id="vm_options-2">VM_OPTIONS</h4>
560573
<p>Additional VM arguments to provide to forked off VMs. Same as
561574
<code>-jvmArgs &lt;args&gt;</code></p>
@@ -601,8 +614,8 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
601614
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
602615
<p>For more notes about the PKCS11 tests, please refer to
603616
test/jdk/sun/security/pkcs11/README.</p>
604-
<h2 id="testing-ahead-of-time-optimizations">### Testing Ahead-of-time
605-
Optimizations</h2>
617+
<h3 id="testing-ahead-of-time-optimizations">Testing Ahead-of-time
618+
Optimizations</h3>
606619
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
607620
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
608621
mode. Example:</p>

doc/testing.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ between the specified revision and the repository tip.
367367
The report is stored in
368368
`build/$BUILD/test-results/jcov-output/diff_coverage_report` file.
369369

370+
#### AOT_JDK
371+
372+
See [Testing Ahead-of-time optimizations](#testing-ahead-of-time-optimizations).
373+
370374
### JTReg keywords
371375

372376
#### JOBS
@@ -397,6 +401,13 @@ the `test/jtreg_test_thread_factory/` directory. This class gets compiled
397401
during the test image build. The implementation of the Virtual class creates a
398402
new virtual thread for executing each test class.
399403

404+
#### JVMTI_STRESS_AGENT
405+
406+
Executes JTReg tests with JVM TI stress agent. The stress agent is the part of
407+
test library and located in `test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp`.
408+
The value of this argument is set as JVM TI agent options.
409+
This mode uses ProblemList-jvmti-stress-agent.txt as an additional exclude list.
410+
400411
#### TEST_MODE
401412

402413
The test mode (`agentvm` or `othervm`).
@@ -545,6 +556,18 @@ Amount of time to spend in each warmup iteration. Same as specifying `-w
545556
Specify to have the test run save a log of the values. Accepts the same values
546557
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
547558

559+
#### TEST_JDK
560+
561+
The path to the JDK that will be used to run the benchmarks.
562+
563+
Defaults to `build/<CONF-NAME>/jdk`.
564+
565+
#### BENCHMARKS_JAR
566+
567+
The path to the JAR containing the benchmarks.
568+
569+
Defaults to `test/micro/benchmarks.jar`.
570+
548571
#### VM_OPTIONS
549572

550573
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
@@ -612,7 +635,7 @@ For more notes about the PKCS11 tests, please refer to
612635
test/jdk/sun/security/pkcs11/README.
613636

614637
### Testing Ahead-of-time Optimizations
615-
-------------------------------------------------------------------------------
638+
616639
One way to improve test coverage of ahead-of-time (AOT) optimizations in
617640
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
618641
Example:

make/RunTests.gmk

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ $(eval $(call SetTestOpt,AOT_JDK,JTREG))
204204

205205
$(eval $(call ParseKeywordVariable, JTREG, \
206206
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
207-
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
208-
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
207+
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY JVMTI_STRESS_AGENT \
208+
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT \
209+
AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
209210
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
210211
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
211212
$(CUSTOM_JTREG_STRING_KEYWORDS), \
@@ -876,6 +877,15 @@ define SetupRunJtregTestBody
876877
))
877878
endif
878879

880+
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), )
881+
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT)
882+
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:$(TEST_IMAGE_DIR)/hotspot/jtreg/native/$$(AGENT)'
883+
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
884+
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \
885+
))
886+
endif
887+
888+
879889
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
880890
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
881891
endif
@@ -1243,7 +1253,7 @@ UseSpecialTestHandler = \
12431253
# Now process each test to run and setup a proper make rule
12441254
$(foreach test, $(TESTS_TO_RUN), \
12451255
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1246-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1256+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
12471257
$(eval ALL_TEST_IDS += $(TEST_ID)) \
12481258
$(if $(call UseCustomTestHandler, $(test)), \
12491259
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
@@ -1323,9 +1333,9 @@ run-test-report: post-run-test
13231333
TEST TOTAL PASS FAIL ERROR SKIP " "
13241334
$(foreach test, $(TESTS_TO_RUN), \
13251335
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
1326-
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
1336+
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
13271337
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
1328-
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
1338+
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
13291339
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
13301340
$(eval TEST_NAME := ) \
13311341
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \

make/RunTestsPrebuiltSpec.gmk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,19 @@ ULIMIT := ulimit
176176
ifeq ($(OPENJDK_BUILD_OS), windows)
177177
PATHTOOL := cygpath
178178
endif
179+
180+
# These settings are needed to run testing with jvmti agent
181+
ifeq ($(OPENJDK_BUILD_OS), linux)
182+
LIBRARY_PREFIX := lib
183+
SHARED_LIBRARY_SUFFIX := .so
184+
endif
185+
186+
ifeq ($(OPENJDK_BUILD_OS), windows)
187+
LIBRARY_PREFIX :=
188+
SHARED_LIBRARY_SUFFIX := .dll
189+
endif
190+
191+
ifeq ($(OPENJDK_BUILD_OS), macosx)
192+
LIBRARY_PREFIX := lib
193+
SHARED_LIBRARY_SUFFIX := .dylib
194+
endif

make/autoconf/flags-cflags.m4

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
940940
# ACLE and this flag are required to build the aarch64 SVE related functions in
941941
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
942942
# that check.
943-
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then
943+
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
944944
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
945945
AC_LANG_PUSH(C)
946946
OLD_CFLAGS="$CFLAGS"
@@ -954,6 +954,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
954954
[
955955
AC_MSG_RESULT([yes])
956956
$2SVE_CFLAGS="-march=armv8-a+sve"
957+
# Switching the initialization mode with gcc from 'pattern' to 'zero'
958+
# avoids the use of unsupported `__builtin_clear_padding` for variable
959+
# length aggregates
960+
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
961+
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
962+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
963+
IF_TRUE: [
964+
$2SVE_CFLAGS="${$2SVE_CFLAGS} $INIT_ZERO_FLAG"
965+
]
966+
)
967+
fi
957968
],
958969
[
959970
AC_MSG_RESULT([no])

make/devkit/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#
4040
# make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora
4141
# or
42-
# make TARGETS="arm-linux-gnueabihf ppc64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=17
42+
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=17
4343
#
4444
# to build several devkits for a specific OS version at once.
4545
# You can find the final results under ../../build/devkit/result/<host>-to-<target>
@@ -50,7 +50,7 @@
5050
# makefile again for cross compilation. Ex:
5151
#
5252
# PATH=$PWD/../../build/devkit/result/x86_64-linux-gnu-to-x86_64-linux-gnu/bin:$PATH \
53-
# make TARGETS="arm-linux-gnueabihf,ppc64-linux-gnu" BASE_OS=Fedora
53+
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora
5454
#
5555
# This is the makefile which iterates over all host and target platforms.
5656
#

0 commit comments

Comments
 (0)