Skip to content

Commit

Permalink
Merge branch 'master' into JDK-8320360-bounds
Browse files Browse the repository at this point in the history
# Conflicts:
#	test/jdk/jdk/classfile/LimitsTest.java
  • Loading branch information
asotona committed Dec 7, 2023
2 parents 469f6c9 + 632a3c5 commit 08bcc54
Show file tree
Hide file tree
Showing 2,277 changed files with 50,801 additions and 40,546 deletions.
2 changes: 1 addition & 1 deletion .github/actions/get-msys2/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ on:
branches-ignore:
- master
- pr/*
- jdk*
workflow_dispatch:
inputs:
platforms:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
- 'jdk/tier1 part 3'
- 'langtools/tier1'
- 'hs/tier1 common'
- 'hs/tier1 compiler'
- 'hs/tier1 compiler part 1'
- 'hs/tier1 compiler part 2'
- 'hs/tier1 compiler part 3'
- 'hs/tier1 gc'
- 'hs/tier1 runtime'
- 'hs/tier1 serviceability'
Expand All @@ -83,8 +85,16 @@ jobs:
test-suite: 'test/hotspot/jtreg/:tier1_common'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler'
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
- test-name: 'hs/tier1 compiler part 1'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler part 2'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2 test/hotspot/jtreg/:tier1_compiler_not_xcomp'
debug-suffix: -debug

- test-name: 'hs/tier1 compiler part 3'
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
debug-suffix: -debug

- test-name: 'hs/tier1 gc'
Expand Down
12 changes: 8 additions & 4 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2023, 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 All @@ -26,10 +26,14 @@
# make sure that is called using bash.

# Get an absolute path to this script, since that determines the top-level directory.
this_script_dir=`dirname $0`
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
source_path="$(dirname ${0})"
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
if test -z "${this_script_dir}"; then
echo "Error: Could not determine location of configure script"
exit 1
fi

# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
# This trick is needed to get autoconf to co-operate properly.
# The ${-:+-$-} construction passes on bash options.
bash ${-:+-$-} -c ". $this_script_dir/make/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
bash ${-:+-$-} -c ". \"${this_script_dir}/make/autoconf/configure\"" "${this_script_dir}/configure" CHECKME "${this_script_dir}" "$@"
40 changes: 20 additions & 20 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#building-on-aarch64" id="toc-building-on-aarch64">Building
on aarch64</a></li>
<li><a href="#building-on-32-bit-arm"
id="toc-building-on-32-bit-arm">Building on 32-bit arm</a></li>
id="toc-building-on-32-bit-arm">Building on 32-bit ARM</a></li>
</ul></li>
<li><a href="#operating-system-requirements"
id="toc-operating-system-requirements">Operating System Requirements</a>
Expand All @@ -74,7 +74,7 @@ <h1 class="title">Building the JDK</h1>
JDK Requirements</a>
<ul>
<li><a href="#getting-jdk-binaries"
id="toc-getting-jdk-binaries">Getting JDK binaries</a></li>
id="toc-getting-jdk-binaries">Getting JDK Binaries</a></li>
</ul></li>
<li><a href="#external-library-requirements"
id="toc-external-library-requirements">External Library Requirements</a>
Expand Down Expand Up @@ -116,7 +116,7 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#macos-1" id="toc-macos-1">macOS</a></li>
</ul></li>
<li><a href="#cross-compiling"
id="toc-cross-compiling">Cross-compiling</a>
id="toc-cross-compiling">Cross-Compiling</a>
<ul>
<li><a href="#specifying-the-target-platform"
id="toc-specifying-the-target-platform">Specifying the Target
Expand All @@ -130,11 +130,11 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#verifying-the-build"
id="toc-verifying-the-build">Verifying the Build</a></li>
<li><a href="#cross-compiling-the-easy-way"
id="toc-cross-compiling-the-easy-way">Cross compiling the easy
way</a></li>
id="toc-cross-compiling-the-easy-way">Cross-Compiling the Easy
Way</a></li>
<li><a href="#considerations-for-specific-targets"
id="toc-considerations-for-specific-targets">Considerations for specific
targets</a></li>
id="toc-considerations-for-specific-targets">Considerations for Specific
Targets</a></li>
</ul></li>
<li><a href="#build-performance" id="toc-build-performance">Build
Performance</a>
Expand All @@ -146,9 +146,9 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#precompiled-headers"
id="toc-precompiled-headers">Precompiled Headers</a></li>
<li><a href="#icecc-icecream" id="toc-icecc-icecream">Icecc /
icecream</a></li>
Icecream</a></li>
<li><a href="#using-the-javac-server"
id="toc-using-the-javac-server">Using the javac server</a></li>
id="toc-using-the-javac-server">Using the javac Server</a></li>
<li><a href="#building-the-right-target"
id="toc-building-the-right-target">Building the Right Target</a></li>
</ul></li>
Expand Down Expand Up @@ -202,7 +202,7 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#contributing-to-the-jdk"
id="toc-contributing-to-the-jdk">Contributing to the JDK</a></li>
<li><a href="#editing-this-document"
id="toc-editing-this-document">Editing this document</a></li>
id="toc-editing-this-document">Editing This Document</a></li>
</ul>
</nav>
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the
Expand Down Expand Up @@ -341,7 +341,7 @@ <h4 id="branch-protection">Branch Protection</h4>
build can be run on both machines with and without support for branch
protection in hardware. Branch Protection is only supported for Linux
targets.</p>
<h3 id="building-on-32-bit-arm">Building on 32-bit arm</h3>
<h3 id="building-on-32-bit-arm">Building on 32-bit ARM</h3>
<p>This is not recommended. Instead, see the section on <a
href="#cross-compiling">Cross-compiling</a>.</p>
<h2 id="operating-system-requirements">Operating System
Expand Down Expand Up @@ -698,7 +698,7 @@ <h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
locations on most platforms, this heuristics has a high likelihood to
fail. If the boot JDK is not automatically detected, or the wrong JDK is
picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
<h3 id="getting-jdk-binaries">Getting JDK binaries</h3>
<h3 id="getting-jdk-binaries">Getting JDK Binaries</h3>
<p>An overview of common ways to download and install prebuilt JDK
binaries can be found on https://openjdk.org/install. An alternative is
to download the <a
Expand Down Expand Up @@ -1233,7 +1233,7 @@ <h3 id="macos-1">macOS</h3>
or the specified identity is valid. If hardened isn't possible, then
<code>debug</code> signing is chosen if it works. If nothing works, the
codesign build step is disabled.</p>
<h2 id="cross-compiling">Cross-compiling</h2>
<h2 id="cross-compiling">Cross-Compiling</h2>
<p>Cross-compiling means using one platform (the <em>build</em>
platform) to generate output that can ran on another platform (the
<em>target</em> platform).</p>
Expand Down Expand Up @@ -1399,7 +1399,7 @@ <h3 id="verifying-the-build">Verifying the Build</h3>
contain the newly built JDK, for your <em>target</em> system.</p>
<p>Copy these folders to your <em>target</em> system. Then you can run
e.g. <code>images/jdk/bin/java -version</code>.</p>
<h3 id="cross-compiling-the-easy-way">Cross compiling the easy way</h3>
<h3 id="cross-compiling-the-easy-way">Cross-Compiling the Easy Way</h3>
<p>Setting up a proper cross-compilation environment can be a lot of
work. Fortunately there are ways that more or less automate this
process. Here are two recommended methods, using the "devkits" that can
Expand All @@ -1409,7 +1409,7 @@ <h3 id="cross-compiling-the-easy-way">Cross compiling the easy way</h3>
solution only work for gcc.</p>
<p>The devkit method is regularly used for testing by Oracle, and the
debootstrap method is regularly used in GitHub Actions testing.</p>
<h4 id="using-openjdk-devkits">Using OpenJDK devkits</h4>
<h4 id="using-openjdk-devkits">Using OpenJDK Devkits</h4>
<p>The JDK build system provides out-of-the box support for creating and
using so called devkits. A <code>devkit</code> is basically a collection
of a cross-compiling toolchain and a sysroot environment which can
Expand Down Expand Up @@ -1660,8 +1660,8 @@ <h4 id="using-debian-debootstrap">Using Debian debootstrap</h4>
</tr>
</tbody>
</table>
<h3 id="considerations-for-specific-targets">Considerations for specific
targets</h3>
<h3 id="considerations-for-specific-targets">Considerations for Specific
Targets</h3>
<h4 id="building-for-arm32">Building for ARM32</h4>
<p>A common cross-compilation target is the ARM CPU. When building for
ARM, it is recommended to set the ABI profile. A number of pre-defined
Expand Down Expand Up @@ -1772,15 +1772,15 @@ <h3 id="precompiled-headers">Precompiled Headers</h3>
circumstances, it can actually slow things down.</p>
<p>You can experiment by disabling pre-compiled headers using
<code>--disable-precompiled-headers</code>.</p>
<h3 id="icecc-icecream">Icecc / icecream</h3>
<h3 id="icecc-icecream">Icecc / Icecream</h3>
<p><a href="https://github.com/icecc/icecream">icecc/icecream</a> is a
simple way to setup a distributed compiler network. If you have multiple
machines available for building the JDK, you can drastically cut
individual build times by utilizing it.</p>
<p>To use, setup an icecc network, and install icecc on the build
machine. Then run <code>configure</code> using
<code>--enable-icecc</code>.</p>
<h3 id="using-the-javac-server">Using the javac server</h3>
<h3 id="using-the-javac-server">Using the javac Server</h3>
<p>To speed up compilation of Java code, especially during incremental
compilations, the javac server is automatically enabled in the
configuration step by default. To explicitly enable or disable the javac
Expand Down Expand Up @@ -2456,7 +2456,7 @@ <h2 id="contributing-to-the-jdk">Contributing to the JDK</h2>
your contribution.</p>
<p>The official place to start is the <a
href="https://openjdk.org/guide/">OpenJDK Developers’ Guide</a>.</p>
<h2 id="editing-this-document">Editing this document</h2>
<h2 id="editing-this-document">Editing This Document</h2>
<p>If you want to contribute changes to this document, edit
<code>doc/building.md</code> and then run
<code>make update-build-docs</code> to generate the same changes in
Expand Down
18 changes: 9 additions & 9 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ support (GCC 9.1.0+ or Clang 10+). The resulting build can be run on both
machines with and without support for branch protection in hardware. Branch
Protection is only supported for Linux targets.

### Building on 32-bit arm
### Building on 32-bit ARM

This is not recommended. Instead, see the section on [Cross-compiling](
#cross-compiling).
Expand Down Expand Up @@ -518,7 +518,7 @@ heuristics has a high likelihood to fail. If the boot JDK is not automatically
detected, or the wrong JDK is picked, use `--with-boot-jdk` to point to the JDK
to use.

### Getting JDK binaries
### Getting JDK Binaries

An overview of common ways to download and install prebuilt JDK binaries can be
found on https://openjdk.org/install. An alternative is to download the [Oracle
Expand Down Expand Up @@ -1026,7 +1026,7 @@ The default mode "auto" will try for `hardened` signing if the debug level is
If hardened isn't possible, then `debug` signing is chosen if it works. If
nothing works, the codesign build step is disabled.

## Cross-compiling
## Cross-Compiling

Cross-compiling means using one platform (the *build* platform) to generate
output that can ran on another platform (the *target* platform).
Expand Down Expand Up @@ -1213,7 +1213,7 @@ built JDK, for your *target* system.
Copy these folders to your *target* system. Then you can run e.g.
`images/jdk/bin/java -version`.

### Cross compiling the easy way
### Cross-Compiling the Easy Way

Setting up a proper cross-compilation environment can be a lot of work.
Fortunately there are ways that more or less automate this process. Here are
Expand All @@ -1225,7 +1225,7 @@ solution only work for gcc.
The devkit method is regularly used for testing by Oracle, and the debootstrap
method is regularly used in GitHub Actions testing.

#### Using OpenJDK devkits
#### Using OpenJDK Devkits

The JDK build system provides out-of-the box support for creating and using so
called devkits. A `devkit` is basically a collection of a cross-compiling
Expand Down Expand Up @@ -1388,7 +1388,7 @@ Architectures that are known to successfully cross-compile like this are:
| sh4 | sid | sh4 | sh4-linux-gnu | zero |
| riscv64 | sid | riscv64 | riscv64-linux-gnu | (all) |

### Considerations for specific targets
### Considerations for Specific Targets

#### Building for ARM32

Expand Down Expand Up @@ -1526,7 +1526,7 @@ things down.
You can experiment by disabling pre-compiled headers using
`--disable-precompiled-headers`.

### Icecc / icecream
### Icecc / Icecream

[icecc/icecream](https://github.com/icecc/icecream) is a simple way to setup a
distributed compiler network. If you have multiple machines available for
Expand All @@ -1536,7 +1536,7 @@ it.
To use, setup an icecc network, and install icecc on the build machine. Then
run `configure` using `--enable-icecc`.

### Using the javac server
### Using the javac Server

To speed up compilation of Java code, especially during incremental
compilations, the javac server is automatically enabled in the configuration
Expand Down Expand Up @@ -2274,7 +2274,7 @@ our rules and guidelines to be able to accept your contribution.
The official place to start is the [OpenJDK Developers’ Guide](
https://openjdk.org/guide/).
## Editing this document
## Editing This Document
If you want to contribute changes to this document, edit `doc/building.md` and
then run `make update-build-docs` to generate the same changes in
Expand Down
11 changes: 7 additions & 4 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,15 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
are hard to diagnose. For example,
sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04
with the default NSS version in the system. To run these tests
correctly, the system property <code>test.nss.lib.paths</code> is
required on Ubuntu 18.04 to specify the alternative NSS lib
directories.</p>
correctly, the system property
<code>jdk.test.lib.artifacts.&lt;NAME&gt;</code> is required on Ubuntu
18.04 to specify the alternative NSS lib directory. The
<code>&lt;NAME&gt;</code> component should be replaced with the name
element of the appropriate <code>@Artifact</code> class. (See
<code>test/jdk/sun/security/pkcs11/PKCS11Test.java</code>)</p>
<p>For example:</p>
<pre><code>$ make test TEST=&quot;jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java&quot; \
JTREG=&quot;JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs&quot;</code></pre>
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
Expand Down
8 changes: 5 additions & 3 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,16 @@ It is highly recommended to use the latest NSS version when running PKCS11
tests. Improper NSS version may lead to unexpected failures which are hard to
diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail
on Ubuntu 18.04 with the default NSS version in the system. To run these tests
correctly, the system property `test.nss.lib.paths` is required on Ubuntu 18.04
to specify the alternative NSS lib directories.
correctly, the system property `jdk.test.lib.artifacts.<NAME>` is required on
Ubuntu 18.04 to specify the alternative NSS lib directory. The `<NAME>`
component should be replaced with the name element of the appropriate
`@Artifact` class. (See `test/jdk/sun/security/pkcs11/PKCS11Test.java`)

For example:

```
$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"
```

For more notes about the PKCS11 tests, please refer to
Expand Down
2 changes: 1 addition & 1 deletion make/CompileDemos.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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
3 changes: 3 additions & 0 deletions make/CompileInterimLangtools.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ define SetupInterimModule
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryContext.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
Standard.java, \
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
$($1.interim_EXTRA_FILES), \
Expand Down
2 changes: 1 addition & 1 deletion make/CompileModuleTools.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2023, 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
3 changes: 1 addition & 2 deletions make/Global.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2023, 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 @@ -52,7 +52,6 @@ help:
$(info $(_) make docs # Create all docs)
$(info $(_) make docs-jdk-api # Create just JDK javadocs)
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK)
$(info $(_) make install # Install the generated images locally)
$(info $(_) make check # Run basic testing (currently tier1))
$(info $(_) make test-<test> # Run test, e.g. test-tier1)
$(info $(_) make test TEST=<t> # Run test(s) given by TEST specification)
Expand Down
Loading

0 comments on commit 08bcc54

Please sign in to comment.