Skip to content

Commit 31537b7

Browse files
committed
merge latest from master branch
2 parents 62a6867 + b21b3a3 commit 31537b7

File tree

7,011 files changed

+222677
-314904
lines changed

Some content is hidden

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

7,011 files changed

+222677
-314904
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*.{cpp,hpp,c,h,java,cc,hh,m,mm,S,md,properties,gmk,m4,ac}]
4+
trim_trailing_whitespace = true
5+
6+
[Makefile]
7+
trim_trailing_whitespace = true
8+
9+
[src/hotspot/**.{cpp,hpp,h}]
10+
indent_style = space
11+
indent_size = 2

.github/actions/do-build/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@ runs:
4242
- name: 'Build'
4343
id: build
4444
run: >
45-
make LOG=info ${{ inputs.make-target }}
45+
make -k LOG=info ${{ inputs.make-target }}
4646
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
4747
shell: bash
4848

.github/actions/get-gtest/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ runs:
4949
- name: 'Export path to where GTest is installed'
5050
id: path-name
5151
run: |
52-
# Export the path
53-
echo 'path=gtest' >> $GITHUB_OUTPUT
52+
# Export the absolute path
53+
echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT
5454
shell: bash

.github/actions/get-jtreg/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ runs:
4949
- name: 'Export path to where JTReg is installed'
5050
id: path-name
5151
run: |
52-
# Export the path
53-
echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
52+
# Export the absolute path
53+
echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT
5454
shell: bash

.github/actions/upload-bundles/action.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
debug-suffix:
3333
description: 'File name suffix denoting debug level, possibly empty'
3434
required: false
35+
bundle-suffix:
36+
description: 'Bundle name suffix, possibly empty'
37+
required: false
3538

3639
runs:
3740
using: composite
@@ -75,7 +78,7 @@ runs:
7578
- name: 'Upload bundles artifact'
7679
uses: actions/upload-artifact@v4
7780
with:
78-
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
81+
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
7982
path: bundles
8083
retention-days: 1
8184
if: steps.bundles.outputs.bundles-found == 'true'

.github/workflows/build-linux.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ on:
6161
make-arguments:
6262
required: false
6363
type: string
64+
bundle-suffix:
65+
required: false
66+
type: string
6467

6568
jobs:
6669
build-linux:
@@ -71,10 +74,6 @@ jobs:
7174
fail-fast: false
7275
matrix:
7376
debug-level: ${{ fromJSON(inputs.debug-levels) }}
74-
include:
75-
- debug-level: debug
76-
flags: --with-debug-level=fastdebug
77-
suffix: -debug
7877

7978
steps:
8079
- name: 'Checkout the JDK source'
@@ -118,7 +117,7 @@ jobs:
118117
run: >
119118
bash configure
120119
--with-conf-name=${{ inputs.platform }}
121-
${{ matrix.flags }}
120+
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
122121
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
123122
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
124123
--with-jtreg=${{ steps.jtreg.outputs.path }}
@@ -133,17 +132,14 @@ jobs:
133132
- name: 'Build'
134133
id: build
135134
uses: ./.github/actions/do-build
136-
env:
137-
# Only build static-libs-bundles for release builds.
138-
# For debug builds, building static-libs often exceeds disk space.
139-
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
140135
with:
141-
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
136+
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
142137
platform: ${{ inputs.platform }}
143-
debug-suffix: '${{ matrix.suffix }}'
138+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
144139

145140
- name: 'Upload bundles'
146141
uses: ./.github/actions/upload-bundles
147142
with:
148143
platform: ${{ inputs.platform }}
149-
debug-suffix: '${{ matrix.suffix }}'
144+
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
145+
bundle-suffix: ${{ inputs.bundle-suffix }}

.github/workflows/main.yml

+37
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,43 @@ jobs:
225225
make-arguments: ${{ github.event.inputs.make-arguments }}
226226
if: needs.prepare.outputs.linux-x64-variants == 'true'
227227

228+
build-linux-x64-static:
229+
name: linux-x64-static
230+
needs: prepare
231+
uses: ./.github/workflows/build-linux.yml
232+
with:
233+
platform: linux-x64
234+
make-target: 'static-jdk-image'
235+
# There are issues with fastdebug static build in GHA due to space limit.
236+
# Only do release build for now.
237+
debug-levels: '[ "release" ]'
238+
gcc-major-version: '10'
239+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
240+
make-arguments: ${{ github.event.inputs.make-arguments }}
241+
# It currently doesn't produce any bundles, but probably will do in
242+
# the future.
243+
bundle-suffix: "-static"
244+
if: needs.prepare.outputs.linux-x64 == 'true'
245+
246+
build-linux-x64-static-libs:
247+
name: linux-x64-static-libs
248+
needs: prepare
249+
uses: ./.github/workflows/build-linux.yml
250+
with:
251+
platform: linux-x64
252+
make-target: 'static-libs-bundles'
253+
# Only build static-libs-bundles for release builds.
254+
# For debug builds, building static-libs often exceeds disk space.
255+
debug-levels: '[ "release" ]'
256+
gcc-major-version: '10'
257+
configure-arguments: ${{ github.event.inputs.configure-arguments }}
258+
make-arguments: ${{ github.event.inputs.make-arguments }}
259+
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
260+
# This bundle is not used by testing jobs, but downstreams use it to check that
261+
# dependent projects, e.g. libgraal, builds fine.
262+
bundle-suffix: "-static-libs"
263+
if: needs.prepare.outputs.linux-x64-variants == 'true'
264+
228265
build-linux-cross-compile:
229266
name: linux-cross-compile
230267
needs: prepare

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ NashornProfile.txt
2222
/.cache
2323
/.gdbinit
2424
/.lldbinit
25+
**/core.[0-9]*

.jcheck/conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ pattern=^([124-8][0-9]{6}): (\S.*)$
3636
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp
3737

3838
[checks "copyright"]
39-
files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar|).*
39+
files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar).*
4040
oracle_locator=.*Copyright \(c\)(.*)Oracle and/or its affiliates\. All rights reserved\.
4141
oracle_validator=.*Copyright \(c\) (\d{4})(?:, (\d{4}))?, Oracle and/or its affiliates\. All rights reserved\.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing to the JDK
22

3-
Please see the [OpenJDK Developers Guide](https://openjdk.org/guide/).
3+
Please see the [OpenJDK Developers' Guide](https://openjdk.org/guide/).

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
5959
else
6060
makefile_path := $(lastword $(MAKEFILE_LIST))
6161
endif
62-
topdir := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
62+
TOPDIR := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
6363

6464
# ... and then we can include the real makefile to bootstrap the build
65-
include $(topdir)/make/PreInit.gmk
65+
include $(TOPDIR)/make/PreInit.gmk

doc/building.html

+21-7
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h2 id="operating-system-requirements">Operating System
376376
</tr>
377377
<tr class="odd">
378378
<td>macOS</td>
379-
<td>macOS 13.x (Ventura)</td>
379+
<td>macOS 14.x</td>
380380
</tr>
381381
<tr class="even">
382382
<td>Windows</td>
@@ -513,8 +513,8 @@ <h3 id="macos">macOS</h3>
513513
a continuously updated machine running macOS. See the section on <a
514514
href="#apple-xcode">Apple Xcode</a> on some strategies to deal with
515515
this.</p>
516-
<p>It is recommended that you use at least macOS 13 (Ventura) and Xcode
517-
14, but earlier versions may also work.</p>
516+
<p>It is recommended that you use at least macOS 14 and Xcode 15.4, but
517+
earlier versions may also work.</p>
518518
<p>The standard macOS environment contains the basic tooling needed to
519519
build, but for external libraries a package manager is recommended. The
520520
JDK uses <a href="https://brew.sh/">homebrew</a> in the examples, but
@@ -586,15 +586,15 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler
586586
<tbody>
587587
<tr class="odd">
588588
<td>Linux</td>
589-
<td>gcc 13.2.0</td>
589+
<td>gcc 14.2.0</td>
590590
</tr>
591591
<tr class="even">
592592
<td>macOS</td>
593-
<td>Apple Xcode 14.3.1 (using clang 14.0.3)</td>
593+
<td>Apple Xcode 15.4 (using clang 15.0.0)</td>
594594
</tr>
595595
<tr class="odd">
596596
<td>Windows</td>
597-
<td>Microsoft Visual Studio 2022 version 17.6.5</td>
597+
<td>Microsoft Visual Studio 2022 version 17.13.2</td>
598598
</tr>
599599
</tbody>
600600
</table>
@@ -604,7 +604,7 @@ <h3 id="gcc">gcc</h3>
604604
<p>The minimum accepted version of gcc is 10.0. Older versions will not
605605
be accepted by <code>configure</code>.</p>
606606
<p>The JDK is currently known to compile successfully with gcc version
607-
13.2 or newer.</p>
607+
14.2 or newer.</p>
608608
<p>In general, any version between these two should be usable.</p>
609609
<h3 id="clang">clang</h3>
610610
<p>The minimum accepted version of clang is 13. Older versions will not
@@ -1722,6 +1722,20 @@ <h4 id="building-for-musl">Building for musl</h4>
17221722
--with-devkit=$DEVKIT \
17231723
--with-sysroot=$SYSROOT</code></pre>
17241724
<p>and run <code>make</code> normally.</p>
1725+
<h4 id="building-for-windows-aarch64">Building for Windows AArch64</h4>
1726+
<p>The Visual Studio Build Tools can be used for building the JDK
1727+
without a full Visual Studio installation. To set up the Visual Studio
1728+
2022 Build Tools on a Windows AArch64 machine for a native build, launch
1729+
the installer as follows in a Windows command prompt:</p>
1730+
<pre><code>vs_buildtools.exe --quiet --wait --norestart --nocache ^
1731+
--installPath &quot;%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools&quot; ^
1732+
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
1733+
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
1734+
--add Microsoft.VisualStudio.Component.Windows11SDK.22621</code></pre>
1735+
<p>To generate Windows AArch64 builds using Cygwin on a Windows x64
1736+
machine, you must set the proper target platform by adding
1737+
<code>--openjdk-target=aarch64-unknown-cygwin</code> to your configure
1738+
command line.</p>
17251739
<h2 id="build-performance">Build Performance</h2>
17261740
<p>Building the JDK requires a lot of horsepower. Some of the build
17271741
tools can be adjusted to utilize more or less of resources such as

doc/building.md

+26-8
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ time of writing.
175175
| ----------------- | ---------------------------------- |
176176
| Linux/x64 | Oracle Enterprise Linux 6.4 / 8.x |
177177
| Linux/aarch64 | Oracle Enterprise Linux 7.6 / 8.x |
178-
| macOS | macOS 13.x (Ventura) |
178+
| macOS | macOS 14.x |
179179
| Windows | Windows Server 2016 |
180180

181181
The double version numbers for Linux are due to the hybrid model used at
@@ -327,7 +327,7 @@ difficult for a project such as the JDK to keep pace with a continuously
327327
updated machine running macOS. See the section on [Apple Xcode](#apple-xcode)
328328
on some strategies to deal with this.
329329

330-
It is recommended that you use at least macOS 13 (Ventura) and Xcode 14, but
330+
It is recommended that you use at least macOS 14 and Xcode 15.4, but
331331
earlier versions may also work.
332332

333333
The standard macOS environment contains the basic tooling needed to build, but
@@ -390,11 +390,11 @@ possible to compile the JDK with both older and newer versions, but the closer
390390
you stay to this list, the more likely you are to compile successfully without
391391
issues.
392392

393-
| Operating system | Toolchain version |
394-
| ------------------ | ------------------------------------------- |
395-
| Linux | gcc 13.2.0 |
396-
| macOS | Apple Xcode 14.3.1 (using clang 14.0.3) |
397-
| Windows | Microsoft Visual Studio 2022 version 17.6.5 |
393+
| Operating system | Toolchain version |
394+
| ------------------ | -------------------------------------------- |
395+
| Linux | gcc 14.2.0 |
396+
| macOS | Apple Xcode 15.4 (using clang 15.0.0) |
397+
| Windows | Microsoft Visual Studio 2022 version 17.13.2 |
398398

399399
All compilers are expected to be able to handle the C11 language standard for
400400
C, and C++14 for C++.
@@ -404,7 +404,7 @@ C, and C++14 for C++.
404404
The minimum accepted version of gcc is 10.0. Older versions will not be accepted
405405
by `configure`.
406406

407-
The JDK is currently known to compile successfully with gcc version 13.2 or
407+
The JDK is currently known to compile successfully with gcc version 14.2 or
408408
newer.
409409

410410
In general, any version between these two should be usable.
@@ -1457,6 +1457,24 @@ sh ./configure --with-jvm-variants=server \
14571457

14581458
and run `make` normally.
14591459

1460+
#### Building for Windows AArch64
1461+
The Visual Studio Build Tools can be used for building the JDK without a full
1462+
Visual Studio installation. To set up the Visual Studio 2022 Build Tools on a
1463+
Windows AArch64 machine for a native build, launch the installer as follows
1464+
in a Windows command prompt:
1465+
1466+
```
1467+
vs_buildtools.exe --quiet --wait --norestart --nocache ^
1468+
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^
1469+
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
1470+
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
1471+
--add Microsoft.VisualStudio.Component.Windows11SDK.22621
1472+
```
1473+
1474+
To generate Windows AArch64 builds using Cygwin on a Windows x64 machine,
1475+
you must set the proper target platform by adding
1476+
`--openjdk-target=aarch64-unknown-cygwin` to your configure command line.
1477+
14601478
## Build Performance
14611479

14621480
Building the JDK requires a lot of horsepower. Some of the build tools can be

doc/hotspot-style.html

+22-7
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,38 @@ <h3 id="source-files">Source Files</h3>
207207
<ul>
208208
<li><p>All source files must have a globally unique basename. The build
209209
system depends on this uniqueness.</p></li>
210+
<li><p>Keep the include lines within a section alphabetically sorted by
211+
their lowercase value. If an include must be out of order for
212+
correctness, suffix with it a comment such as
213+
<code>// do not reorder</code>. Source code processing tools can also
214+
use this hint.</p></li>
215+
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
216+
the section of HotSpot include lines. This also applies to
217+
macro-expanded includes of platform dependent files.</p></li>
218+
<li><p>Put system includes in a section after the HotSpot include lines
219+
with a blank line separating the two sections.</p></li>
210220
<li><p>Do not put non-trivial function implementations in .hpp files. If
211221
the implementation depends on other .hpp files, put it in a .cpp or a
212222
.inline.hpp file.</p></li>
213223
<li><p>.inline.hpp files should only be included in .cpp or .inline.hpp
214224
files.</p></li>
215225
<li><p>All .inline.hpp files should include their corresponding .hpp
216-
file as the first include line. Declarations needed by other files
217-
should be put in the .hpp file, and not in the .inline.hpp file. This
218-
rule exists to resolve problems with circular dependencies between
219-
.inline.hpp files.</p></li>
226+
file as the first include line with a blank line separating it from the
227+
rest of the include lines. Declarations needed by other files should be
228+
put in the .hpp file, and not in the .inline.hpp file. This rule exists
229+
to resolve problems with circular dependencies between .inline.hpp
230+
files.</p></li>
231+
<li><p>Do not include a .hpp file if the corresponding .inline.hpp file
232+
is included.</p></li>
233+
<li><p>Use include guards for .hpp and .inline.hpp files. The name of
234+
the defined guard should be derived from the full search path of the
235+
file relative to the hotspot source directory. The guard should be all
236+
upper case with all paths separators and periods replaced by
237+
underscores.</p></li>
220238
<li><p>Some build configurations use precompiled headers to speed up the
221239
build times. The precompiled headers are included in the precompiled.hpp
222240
file. Note that precompiled.hpp is just a build time optimization, so
223241
don't rely on it to resolve include problems.</p></li>
224-
<li><p>Keep the include lines alphabetically sorted.</p></li>
225-
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
226-
the include list.</p></li>
227242
</ul>
228243
<h3 id="jtreg-tests">JTReg Tests</h3>
229244
<ul>

0 commit comments

Comments
 (0)