Skip to content

Commit e4a095b

Browse files
Merge tag 'jdk-23+25' into labsjdk/automation-5-30-2024-8389
Added tag jdk-23+25 for changeset 789ac8b
2 parents a9fe509 + 789ac8b commit e4a095b

File tree

588 files changed

+15640
-7588
lines changed

Some content is hidden

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

588 files changed

+15640
-7588
lines changed

doc/testing.html

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ <h2 id="test-selection">Test selection</h2>
177177
more tab-completion friendly. For more complex test runs, the
178178
<code>test TEST="x"</code> solution needs to be used.</p>
179179
<p>The test specifications given in <code>TEST</code> is parsed into
180-
fully qualified test descriptors, which clearly and unambigously show
180+
fully qualified test descriptors, which clearly and unambiguously show
181181
which tests will be run. As an example, <code>:tier1</code> will expand
182-
to include all subcomponent test directories that define `tier1`,
183-
for example:
182+
to include all subcomponent test directories that define
183+
<code>tier1</code>, for example:
184184
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...</code>.
185185
You can always submit a list of fully qualified test descriptors in the
186186
<code>TEST</code> variable if you want to shortcut the parser.</p>
@@ -228,7 +228,7 @@ <h3 id="common-test-groups">Common Test Groups</h3>
228228
These contain, among other things, tests that either run for too long to
229229
be at <code>tier1</code>, or may require special configuration, or tests
230230
that are less stable, or cover the broader range of non-core JVM and JDK
231-
features/components(for example, XML).</p></li>
231+
features/components (for example, XML).</p></li>
232232
<li><p><code>tier3</code>: This test group includes more stressful
233233
tests, the tests for corner cases not covered by previous tiers, plus
234234
the tests that require GUIs. As such, this suite should either be run
@@ -368,7 +368,7 @@ <h2 id="test-suite-control">Test suite control</h2>
368368
just pass unnoticed.</p>
369369
<p>To separate multiple keyword=value pairs, use <code>;</code>
370370
(semicolon). Since the shell normally eats <code>;</code>, the
371-
recommended usage is to write the assignment inside qoutes, e.g.
371+
recommended usage is to write the assignment inside quotes, e.g.
372372
<code>JTREG="...;..."</code>. This will also make sure spaces are
373373
preserved, as in
374374
<code>JTREG="JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"</code>.</p>
@@ -397,10 +397,8 @@ <h4 id="java_options">JAVA_OPTIONS</h4>
397397
<p>Applies to JTReg, GTest and Micro.</p>
398398
<h4 id="vm_options">VM_OPTIONS</h4>
399399
<p>Applies to JTReg, GTest and Micro.</p>
400-
<h4 id="aot_modules">AOT_MODULES</h4>
401-
<p>Applies to JTReg and GTest.</p>
402400
<h4 id="jcov">JCOV</h4>
403-
<p>This keywords applies globally to the test runner system. If set to
401+
<p>This keyword applies globally to the test runner system. If set to
404402
<code>true</code>, it enables JCov coverage reporting for all tests run.
405403
To be useful, the JDK under test must be run with a JDK built with JCov
406404
instrumentation
@@ -500,11 +498,6 @@ <h4 id="vm_options-1">VM_OPTIONS</h4>
500498
<h4 id="launcher_options">LAUNCHER_OPTIONS</h4>
501499
<p>Additional Java options that are sent to the java launcher that
502500
starts the JTReg harness.</p>
503-
<h4 id="aot_modules-1">AOT_MODULES</h4>
504-
<p>Generate AOT modules before testing for the specified module, or set
505-
of modules. If multiple modules are specified, they should be separated
506-
by space (or, to help avoid quoting issues, the special value
507-
<code>%20</code>).</p>
508501
<h4 id="retry_count">RETRY_COUNT</h4>
509502
<p>Retry failed tests up to a set number of times, until they pass. This
510503
allows to pass the tests with intermittent failures. Defaults to 0.</p>
@@ -527,11 +520,6 @@ <h4 id="options-1">OPTIONS</h4>
527520
<p>Additional options to the Gtest test framework.</p>
528521
<p>Use <code>GTEST="OPTIONS=--help"</code> to see all available Gtest
529522
options.</p>
530-
<h4 id="aot_modules-2">AOT_MODULES</h4>
531-
<p>Generate AOT modules before testing for the specified module, or set
532-
of modules. If multiple modules are specified, they should be separated
533-
by space (or, to help avoid quoting issues, the special value
534-
<code>%20</code>).</p>
535523
<h3 id="microbenchmark-keywords">Microbenchmark keywords</h3>
536524
<h4 id="fork">FORK</h4>
537525
<p>Override the number of benchmark forks to spawn. Same as specifying
@@ -575,7 +563,7 @@ <h3 id="non-us-locale">Non-US locale</h3>
575563
<p>If your locale is non-US, some tests are likely to fail. To work
576564
around this you can set the locale to US. On Unix platforms simply
577565
setting <code>LANG="en_US"</code> in the environment before running
578-
tests should work. On Windows or MacOS, setting
566+
tests should work. On Windows or macOS, setting
579567
<code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code>
580568
helps for most, but not all test cases.</p>
581569
<p>For example:</p>
@@ -610,7 +598,7 @@ <h5 id="macos">macOS</h5>
610598
Shortcuts; select or deselect desired shortcut.</p>
611599
<p>For example,
612600
test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java
613-
fails on MacOS because it uses <code>CTRL + F1</code> key sequence to
601+
fails on macOS because it uses <code>CTRL + F1</code> key sequence to
614602
show or hide tooltip message but the key combination is reserved by the
615603
operating system. To run the test correctly the default global key
616604
shortcut should be disabled using the steps described above, and then

doc/testing.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ TEST="tier1"`, but the latter is more tab-completion friendly. For more complex
102102
test runs, the `test TEST="x"` solution needs to be used.
103103

104104
The test specifications given in `TEST` is parsed into fully qualified test
105-
descriptors, which clearly and unambigously show which tests will be run. As an
106-
example, `:tier1` will expand to include all subcomponent test directories
105+
descriptors, which clearly and unambiguously show which tests will be run. As
106+
an example, `:tier1` will expand to include all subcomponent test directories
107107
that define `tier1`, for example: `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
108108
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...`. You
109109
can always submit a list of fully qualified test descriptors in the `TEST`
@@ -151,7 +151,7 @@ A brief description of the tiered test groups:
151151
- `tier2`: This test group covers even more ground. These contain, among other
152152
things, tests that either run for too long to be at `tier1`, or may require
153153
special configuration, or tests that are less stable, or cover the broader
154-
range of non-core JVM and JDK features/components(for example, XML).
154+
range of non-core JVM and JDK features/components (for example, XML).
155155

156156
- `tier3`: This test group includes more stressful tests, the tests for corner
157157
cases not covered by previous tiers, plus the tests that require GUIs. As
@@ -294,7 +294,7 @@ would just pass unnoticed.
294294

295295
To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell
296296
normally eats `;`, the recommended usage is to write the assignment inside
297-
qoutes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved,
297+
quotes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved,
298298
as in `JTREG="JAVA_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"`.
299299

300300
(Other ways are possible, e.g. using backslash:
@@ -334,13 +334,9 @@ Applies to JTReg, GTest and Micro.
334334

335335
Applies to JTReg, GTest and Micro.
336336

337-
#### AOT_MODULES
338-
339-
Applies to JTReg and GTest.
340-
341337
#### JCOV
342338

343-
This keywords applies globally to the test runner system. If set to `true`, it
339+
This keyword applies globally to the test runner system. If set to `true`, it
344340
enables JCov coverage reporting for all tests run. To be useful, the JDK under
345341
test must be run with a JDK built with JCov instrumentation (`configure
346342
--with-jcov=<path to directory containing lib/jcov.jar>`, `make jcov-image`).
@@ -480,12 +476,6 @@ your test classes, use `JAVA_OPTIONS`.
480476
Additional Java options that are sent to the java launcher that starts the
481477
JTReg harness.
482478

483-
#### AOT_MODULES
484-
485-
Generate AOT modules before testing for the specified module, or set of
486-
modules. If multiple modules are specified, they should be separated by space
487-
(or, to help avoid quoting issues, the special value `%20`).
488-
489479
#### RETRY_COUNT
490480

491481
Retry failed tests up to a set number of times, until they pass. This allows to
@@ -517,12 +507,6 @@ Additional options to the Gtest test framework.
517507

518508
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
519509

520-
#### AOT_MODULES
521-
522-
Generate AOT modules before testing for the specified module, or set of
523-
modules. If multiple modules are specified, they should be separated by space
524-
(or, to help avoid quoting issues, the special value `%20`).
525-
526510
### Microbenchmark keywords
527511

528512
#### FORK
@@ -587,7 +571,7 @@ $ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
587571

588572
If your locale is non-US, some tests are likely to fail. To work around this
589573
you can set the locale to US. On Unix platforms simply setting `LANG="en_US"`
590-
in the environment before running tests should work. On Windows or MacOS,
574+
in the environment before running tests should work. On Windows or macOS,
591575
setting `JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for
592576
most, but not all test cases.
593577

@@ -635,7 +619,7 @@ select or deselect desired shortcut.
635619

636620
For example,
637621
test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java
638-
fails on MacOS because it uses `CTRL + F1` key sequence to show or hide tooltip
622+
fails on macOS because it uses `CTRL + F1` key sequence to show or hide tooltip
639623
message but the key combination is reserved by the operating system. To run the
640624
test correctly the default global key shortcut should be disabled using the
641625
steps described above, and then deselect "Turn keyboard access on or off"

make/InitSupport.gmk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,12 @@ else # $(HAS_SPEC)=true
501501
# Failure logs are only supported for "parallel" main targets, not the
502502
# (trivial) sequential make targets (such as clean and reconfigure),
503503
# since the failure-logs directory creation will conflict with clean.
504+
# We also make sure the javatmp directory exists, which is needed if a java
505+
# process (like javac) is using java.io.tmpdir.
504506
define PrepareFailureLogs
505507
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
506508
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
509+
$(MKDIR) -p $(JAVA_TMP_DIR)
507510
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
508511
endef
509512

make/autoconf/flags-ldflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
7171
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"
7272
7373
if test "x$OPENJDK_TARGET_OS" = xlinux; then
74-
BASIC_LDFLAGS="-Wl,--exclude-libs,ALL"
74+
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
7575
fi
7676
if test "x$OPENJDK_TARGET_OS" = xaix; then
7777
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \

make/autoconf/spec.gmk.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ BUNDLES_OUTPUTDIR = $(OUTPUTDIR)/bundles
353353
TESTMAKE_OUTPUTDIR = $(OUTPUTDIR)/test-make
354354
MAKESUPPORT_OUTPUTDIR = $(OUTPUTDIR)/make-support
355355

356+
JAVA_TMP_DIR = $(SUPPORT_OUTPUTDIR)/javatmp
357+
356358
# This does not get overridden in a bootcycle build
357359
CONFIGURESUPPORT_OUTPUTDIR := @CONFIGURESUPPORT_OUTPUTDIR@
358360
BUILDJDK_OUTPUTDIR = $(OUTPUTDIR)/buildjdk
@@ -634,7 +636,8 @@ STATIC_BUILD := @STATIC_BUILD@
634636

635637
STRIPFLAGS := @STRIPFLAGS@
636638

637-
JAVA_FLAGS := @JAVA_FLAGS@
639+
JAVA_FLAGS_TMPDIR := -Djava.io.tmpdir=$(JAVA_TMP_DIR)
640+
JAVA_FLAGS := @JAVA_FLAGS@ $(JAVA_FLAGS_TMPDIR)
638641
JAVA_FLAGS_BIG := @JAVA_FLAGS_BIG@
639642
JAVA_FLAGS_SMALL := @JAVA_FLAGS_SMALL@
640643
BUILD_JAVA_FLAGS_SMALL := @BUILD_JAVA_FLAGS_SMALL@

make/common/JavaCompilation.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ define SetupJavaCompilationBody
197197

198198
ifeq ($$($1_COMPILER), bootjdk)
199199
# Javac server is not available when using the bootjdk compiler.
200-
$1_JAVAC_CMD := $$(JAVAC)
200+
$1_JAVAC_CMD := $$(JAVAC) -J$$(JAVA_FLAGS_TMPDIR)
201201

202202
ifeq ($$($1_SMALL_JAVA), true)
203203
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
@@ -211,7 +211,7 @@ define SetupJavaCompilationBody
211211
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
212212
endif
213213
else ifeq ($$($1_COMPILER), buildjdk)
214-
$1_JAVAC_CMD := $$(BUILD_JAVAC)
214+
$1_JAVAC_CMD := $$(BUILD_JAVAC) -J$$(JAVA_FLAGS_TMPDIR)
215215

216216
ifeq ($$($1_TARGET_RELEASE), )
217217
# If unspecified, default to the new jdk we're building
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SUNWprivate_1.1 {
2+
global:
3+
*;
4+
5+
local:
6+
_fini;
7+
_init;
8+
};
File renamed without changes.

make/hotspot/lib/CompileJvm.gmk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ JVM_LDFLAGS += \
4747

4848
JVM_ASFLAGS += $(EXTRA_ASFLAGS)
4949

50+
JVM_ASFLAGS += \
51+
-I$(TOPDIR)/src/hotspot/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \
52+
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS) \
53+
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE) \
54+
#
55+
5056
JVM_LIBS += \
5157
$(JVM_LIBS_FEATURES) \
5258
#
@@ -148,7 +154,7 @@ ifeq ($(call isTargetOs, windows), true)
148154
endif
149155

150156
ifeq ($(call isTargetOs, linux), true)
151-
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script.txt
157+
HOTSPOT_VERSION_SCRIPT := $(TOPDIR)/make/data/hotspot-symbols/version-script-$(TOOLCHAIN_TYPE).txt
152158

153159
JVM_LDFLAGS += -Wl,-version-script=$(HOTSPOT_VERSION_SCRIPT)
154160
endif

make/jdk/src/classes/build/tools/classlist/HelloClasslist.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ public static void main(String ... args) throws Throwable {
151151

152152
LOGGER.log(Level.FINE, "New Date: " + newDate + " - old: " + oldDate);
153153

154+
// Pull SwitchBootstraps and associated classes into the classlist
155+
record A(int a) { }
156+
record B(int b) { }
157+
Object o = new A(4711);
158+
int value = switch (o) {
159+
case A a -> a.a;
160+
case B b -> b.b;
161+
default -> 17;
162+
};
163+
LOGGER.log(Level.FINE, "Value: " + value);
164+
154165
// The Striped64$Cell is loaded rarely only when there's a contention among
155166
// multiple threads performing LongAdder.increment(). This results in
156167
// an inconsistency in the classlist between builds (see JDK-8295951).

0 commit comments

Comments
 (0)