Skip to content

Commit c338a5e

Browse files
Merge tag 'jdk-25+26' into labsjdk/adopt-jdk-25+26-master
Added tag jdk-25+26 for changeset c59e44a
2 parents 2a0e5e8 + c59e44a commit c338a5e

File tree

1,064 files changed

+51656
-26182
lines changed

Some content is hidden

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

1,064 files changed

+51656
-26182
lines changed

.github/workflows/build-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ env:
6363
jobs:
6464
build-windows:
6565
name: build
66-
runs-on: windows-2019
66+
runs-on: windows-2025
6767
defaults:
6868
run:
6969
shell: bash
@@ -102,7 +102,7 @@ jobs:
102102
id: toolchain-check
103103
run: |
104104
set +e
105-
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
105+
'/c/Program Files/Microsoft Visual Studio/2022/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
106106
if [ $? -eq 0 ]; then
107107
echo "Toolchain is already installed"
108108
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
@@ -115,7 +115,7 @@ jobs:
115115
run: |
116116
# Run Visual Studio Installer
117117
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
118-
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
118+
modify --quiet --installPath 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' \
119119
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
120120
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
121121

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ jobs:
310310
uses: ./.github/workflows/build-windows.yml
311311
with:
312312
platform: windows-x64
313-
msvc-toolset-version: '14.29'
313+
msvc-toolset-version: '14.43'
314314
msvc-toolset-architecture: 'x86.x64'
315315
configure-arguments: ${{ github.event.inputs.configure-arguments }}
316316
make-arguments: ${{ github.event.inputs.make-arguments }}
@@ -322,7 +322,7 @@ jobs:
322322
uses: ./.github/workflows/build-windows.yml
323323
with:
324324
platform: windows-aarch64
325-
msvc-toolset-version: '14.29'
325+
msvc-toolset-version: '14.43'
326326
msvc-toolset-architecture: 'arm64'
327327
make-target: 'hotspot'
328328
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
@@ -393,5 +393,5 @@ jobs:
393393
with:
394394
platform: windows-x64
395395
bootjdk-platform: windows-x64
396-
runs-on: windows-2019
396+
runs-on: windows-2025
397397
debug-suffix: -debug

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ NashornProfile.txt
2323
/.gdbinit
2424
/.lldbinit
2525
**/core.[0-9]*
26+
*.rej
27+
*.orig

doc/starting-next-release.html

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="generator" content="pandoc" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7+
<title>Explanation of start of release changes</title>
8+
<style>
9+
code{white-space: pre-wrap;}
10+
span.smallcaps{font-variant: small-caps;}
11+
div.columns{display: flex; gap: min(4vw, 1.5em);}
12+
div.column{flex: auto; overflow-x: auto;}
13+
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;}
17+
ul.task-list li input[type="checkbox"] {
18+
font-size: inherit;
19+
width: 0.8em;
20+
margin: 0 0.8em 0.2em -1.6em;
21+
vertical-align: middle;
22+
}
23+
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
24+
</style>
25+
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
26+
<!--[if lt IE 9]>
27+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
28+
<![endif]-->
29+
</head>
30+
<body>
31+
<header id="title-block-header">
32+
<h1 class="title">Explanation of start of release changes</h1>
33+
</header>
34+
<nav id="TOC" role="doc-toc">
35+
<ul>
36+
<li><a href="#overview" id="toc-overview">Overview</a></li>
37+
<li><a href="#details-and-file-updates"
38+
id="toc-details-and-file-updates">Details and file updates</a>
39+
<ul>
40+
<li><a href="#meta-data-files" id="toc-meta-data-files">Meta-data
41+
files</a></li>
42+
<li><a href="#src-files" id="toc-src-files"><code>src</code>
43+
files</a></li>
44+
<li><a href="#test-files" id="toc-test-files"><code>test</code>
45+
files</a></li>
46+
</ul></li>
47+
</ul>
48+
</nav>
49+
<h2 id="overview">Overview</h2>
50+
<p>The start of release changes, the changes that turn JDK <em>N</em>
51+
into JDK (<em>N</em>+1), are primarily small updates to various files
52+
along with new files to store symbol information to allow
53+
<code>javac --release N ...</code> to run on JDK (<em>N</em>+1).</p>
54+
<p>The updates include changes to files holding meta-data about the
55+
release, files under the <code>src</code> directory for API and tooling
56+
updates, and incidental updates under the <code>test</code>
57+
directory.</p>
58+
<h2 id="details-and-file-updates">Details and file updates</h2>
59+
<p>As a matter of policy, there are a number of semantically distinct
60+
concepts which get incremented separately at the start of a new
61+
release:</p>
62+
<ul>
63+
<li>Feature value of <code>Runtime.version()</code></li>
64+
<li>Highest source version modeled by
65+
<code>javax.lang.model.SourceVersion</code></li>
66+
<li>Highest class file format major version recognized by the
67+
platform</li>
68+
<li>Highest
69+
<code>-source</code>/<code>-target</code>/<code>--release</code>
70+
argument recognized by <code>javac</code> and related tools</li>
71+
</ul>
72+
<p>The expected file updates are listed below. Additional files may need
73+
to be updated for a particular release.</p>
74+
<h3 id="meta-data-files">Meta-data files</h3>
75+
<ul>
76+
<li><code>jcheck/conf</code>: update meta-data used by
77+
<code>jcheck</code> and the Skara tooling</li>
78+
<li><code>make/conf/version-numbers.conf</code>: update to meta-data
79+
used in the build</li>
80+
</ul>
81+
<h3 id="src-files"><code>src</code> files</h3>
82+
<ul>
83+
<li><code>src/hotspot/share/classfile/classFileParser.cpp</code>: add a
84+
<code>#define</code> for the new version</li>
85+
<li><code>src/java.base/share/classes/java/lang/classfile/ClassFile.java</code>:
86+
add a constant for the new class file format version</li>
87+
<li><code>src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java</code>:
88+
add an <code>enum</code> constant for the new class file format
89+
version</li>
90+
<li><code>src/java.compiler/share/classes/javax/lang/model/SourceVersion.java</code>:
91+
add an <code>enum</code> constant for the new source version</li>
92+
<li><code>src/java.compiler/share/classes/javax/lang/model/util/*</code>
93+
visitors: Update <code>@SupportedSourceVersion</code> annotations to
94+
latest value. Note this update is done in lieu of introducing another
95+
set of visitors for each Java SE release.</li>
96+
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java</code>:
97+
add an <code>enum</code> constant for the new source version internal to
98+
<code>javac</code></li>
99+
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java</code>:
100+
add an <code>enum</code> constant for the new class file format version
101+
internal to <code>javac</code></li>
102+
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java</code>:
103+
add an <code>enum</code> constant for the new target version internal to
104+
<code>javac</code></li>
105+
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java</code>
106+
update printing processor to support the new source version</li>
107+
<li>The symbol information for <code>--release</code> is stored as new
108+
text files in the <code>src/jdk.compiler/share/data/symbols</code>
109+
directory, one file per module. The README file in that directory
110+
contains directions on how to create the files.</li>
111+
</ul>
112+
<h3 id="test-files"><code>test</code> files</h3>
113+
<ul>
114+
<li><code>test/langtools/tools/javac/api/TestGetSourceVersions.java</code>:
115+
add new <code>SourceVersion</code> constant to test matrix.</li>
116+
<li><code>test/langtools/tools/javac/classfiles/ClassVersionChecker.java</code>:
117+
add new enum constant for the new class file version</li>
118+
<li><code>test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java</code>
119+
update annotation processor extended by <code>javac</code> tests to
120+
cover the new source version</li>
121+
<li><code>test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out</code>
122+
and
123+
<code>test/langtools/tools/javac/preview/classReaderTest/Client.preview.out</code>:
124+
update expected messages for preview errors and warnings</li>
125+
</ul>
126+
</body>
127+
</html>

doc/starting-next-release.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
% Explanation of start of release changes
2+
3+
## Overview
4+
5+
The start of release changes, the changes that turn JDK _N_ into JDK
6+
(_N_+1), are primarily small updates to various files along with new files to
7+
store symbol information to allow `javac --release N ...` to run on
8+
JDK (_N_+1).
9+
10+
The updates include changes to files holding meta-data about the
11+
release, files under the `src` directory for API and tooling updates,
12+
and incidental updates under the `test` directory.
13+
14+
## Details and file updates
15+
16+
As a matter of policy, there are a number of semantically distinct
17+
concepts which get incremented separately at the start of a new
18+
release:
19+
20+
* Feature value of `Runtime.version()`
21+
* Highest source version modeled by `javax.lang.model.SourceVersion`
22+
* Highest class file format major version recognized by the platform
23+
* Highest `-source`/`-target`/`--release` argument recognized by
24+
`javac` and related tools
25+
26+
The expected file updates are listed below. Additional files may need
27+
to be updated for a particular release.
28+
29+
### Meta-data files
30+
31+
* `jcheck/conf`: update meta-data used by `jcheck` and the Skara tooling
32+
* `make/conf/version-numbers.conf`: update to meta-data used in the build
33+
34+
### `src` files
35+
36+
* `src/hotspot/share/classfile/classFileParser.cpp`: add a `#define`
37+
for the new version
38+
* `src/java.base/share/classes/java/lang/classfile/ClassFile.java`:
39+
add a constant for the new class file format version
40+
* `src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java`:
41+
add an `enum` constant for the new class file format version
42+
* `src/java.compiler/share/classes/javax/lang/model/SourceVersion.java`:
43+
add an `enum` constant for the new source version
44+
* `src/java.compiler/share/classes/javax/lang/model/util/*` visitors: Update
45+
`@SupportedSourceVersion` annotations to latest value. Note this update
46+
is done in lieu of introducing another set of visitors for each Java
47+
SE release.
48+
* `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java`:
49+
add an `enum` constant for the new source version internal to `javac`
50+
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java`:
51+
add an `enum` constant for the new class file format version internal to `javac`
52+
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java`:
53+
add an `enum` constant for the new target version internal to `javac`
54+
* `src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java`
55+
update printing processor to support the new source version
56+
* The symbol information for `--release` is stored as new text files in the
57+
`src/jdk.compiler/share/data/symbols` directory, one file per
58+
module. The README file in that directory contains directions on how
59+
to create the files.
60+
61+
### `test` files
62+
63+
* `test/langtools/tools/javac/api/TestGetSourceVersions.java`: add new `SourceVersion` constant to test matrix.
64+
* `test/langtools/tools/javac/classfiles/ClassVersionChecker.java`: add new enum constant for the new class file version
65+
* `test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java`
66+
update annotation processor extended by `javac` tests to cover the new source version
67+
* `test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out` and `test/langtools/tools/javac/preview/classReaderTest/Client.preview.out`: update expected messages for preview errors and warnings
68+

doc/testing.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ <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>
76+
<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>
7580
<li><a href="#testing-with-alternative-security-providers"
7681
id="toc-testing-with-alternative-security-providers">Testing with
7782
alternative security providers</a></li>
@@ -596,6 +601,37 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
596601
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
597602
<p>For more notes about the PKCS11 tests, please refer to
598603
test/jdk/sun/security/pkcs11/README.</p>
604+
<h2 id="testing-ahead-of-time-optimizations">### Testing Ahead-of-time
605+
Optimizations</h2>
606+
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
607+
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
608+
mode. Example:</p>
609+
<pre><code>$ make test JTREG=&quot;AOT_JDK=onestep&quot; \
610+
TEST=open/test/hotspot/jtreg/runtime/invokedynamic</code></pre>
611+
<p>In this testing mode, we first perform an AOT training run (see
612+
https://openjdk.org/jeps/483) of a special test program (<a
613+
href="../test/setup_aot/TestSetupAOT.java">test/setup_aot/TestSetupAOT.java</a>)
614+
that accesses about 5,0000 classes in the JDK core libraries.
615+
Optimization artifacts for these classes (such as pre-linked lambda
616+
expressions, execution profiles, and pre-generated native code) are
617+
stored into an AOT cache file, which will be used by all the JVMs
618+
launched by the selected jtreg test cases.</p>
619+
<p>When the jtreg tests call into the core libraries classes that are in
620+
the AOT cache, we will be able to test the AOT optimizations that were
621+
used on those classes.</p>
622+
<p>Please note that not all existing jtreg test cases can be executed
623+
with the AOT_JDK mode. See <a
624+
href="../test/hotspot/jtreg/ProblemList-AotJdk.txt">test/hotspot/jtreg/ProblemList-AotJdk.txt</a>
625+
and <a
626+
href="../test/jdk/ProblemList-AotJdk.txt">test/jdk/ProblemList-AotJdk.txt</a>.</p>
627+
<p>Also, test cases that were written specifically to test AOT, such as
628+
the tests under <a
629+
href="../test/hotspot/jtreg/runtime/cds/">test/hotspot/jtreg/runtime/cds</a>,
630+
cannot be executed with the AOT_JDK mode.</p>
631+
<p>Valid values for <code>AOT_JDK</code> are <code>onestep</code> and
632+
<code>twostep</code>. These control how the AOT cache is generated. See
633+
https://openjdk.org/jeps/514 for details. All other values are
634+
ignored.</p>
599635
<h3 id="testing-with-alternative-security-providers">Testing with
600636
alternative security providers</h3>
601637
<p>Some security tests use a hardcoded provider for

doc/testing.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,43 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
611611
For more notes about the PKCS11 tests, please refer to
612612
test/jdk/sun/security/pkcs11/README.
613613

614+
### Testing Ahead-of-time Optimizations
615+
-------------------------------------------------------------------------------
616+
One way to improve test coverage of ahead-of-time (AOT) optimizations in
617+
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
618+
Example:
619+
620+
```
621+
$ make test JTREG="AOT_JDK=onestep" \
622+
TEST=open/test/hotspot/jtreg/runtime/invokedynamic
623+
```
624+
625+
In this testing mode, we first perform an AOT training run
626+
(see https://openjdk.org/jeps/483) of a special test program
627+
([test/setup_aot/TestSetupAOT.java](../test/setup_aot/TestSetupAOT.java))
628+
that accesses about 5,0000 classes in the JDK core libraries.
629+
Optimization artifacts for these classes (such as pre-linked
630+
lambda expressions, execution profiles, and pre-generated native code)
631+
are stored into an AOT cache file, which will be used by all the JVMs
632+
launched by the selected jtreg test cases.
633+
634+
When the jtreg tests call into the core libraries classes that are in
635+
the AOT cache, we will be able to test the AOT optimizations that were
636+
used on those classes.
637+
638+
Please note that not all existing jtreg test cases can be executed with
639+
the AOT_JDK mode. See
640+
[test/hotspot/jtreg/ProblemList-AotJdk.txt](../test/hotspot/jtreg/ProblemList-AotJdk.txt)
641+
and [test/jdk/ProblemList-AotJdk.txt](../test/jdk/ProblemList-AotJdk.txt).
642+
643+
Also, test cases that were written specifically to test AOT, such as the tests
644+
under [test/hotspot/jtreg/runtime/cds](../test/hotspot/jtreg/runtime/cds/),
645+
cannot be executed with the AOT_JDK mode.
646+
647+
Valid values for `AOT_JDK` are `onestep` and `twostep`. These control how
648+
the AOT cache is generated. See https://openjdk.org/jeps/514 for details.
649+
All other values are ignored.
650+
614651
### Testing with alternative security providers
615652

616653
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,

make/Docs.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ JAVADOC_TAGS := \
7979
-tag see \
8080
-taglet build.tools.taglet.ExtLink \
8181
-taglet build.tools.taglet.Incubating \
82-
-taglet build.tools.taglet.PreviewNote \
83-
--preview-note-tag previewNote \
8482
-tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
8583
$(CUSTOM_JAVADOC_TAGS) \
8684
#
@@ -542,7 +540,9 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
542540
# Format: space-delimited list of names, including at most one '%' as a
543541
# wildcard. Spec source files match if their filename or any enclosing folder
544542
# name matches one of the items in SPEC_FILTER.
545-
SPEC_FILTER := %
543+
ifeq ($(SPEC_FILTER), )
544+
SPEC_FILTER := %
545+
endif
546546

547547
ApplySpecFilter = \
548548
$(strip $(foreach file, $(1), \

0 commit comments

Comments
 (0)