Skip to content

Commit 6a0e7b9

Browse files
committed
Merge master HEAD into openj9-staging
Signed-off-by: J9 Build <[email protected]>
2 parents 82245b7 + f05f943 commit 6a0e7b9

File tree

41 files changed

+2461
-201
lines changed

Some content is hidden

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

41 files changed

+2461
-201
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/hotspot/lib/CompileJvm.gmk

Lines changed: 6 additions & 0 deletions
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
#

make/modules/java.xml/Copy.gmk

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2023, 2024, 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
@@ -24,14 +24,17 @@
2424
#
2525

2626
include CopyCommon.gmk
27+
include Modules.gmk
2728

2829
################################################################################
30+
#
31+
# Copy property and template files from share/conf to CONF_DST_DIR
32+
#
33+
$(eval $(call SetupCopyFiles, COPY_XML_MODULE_CONF, \
34+
DEST := $(CONF_DST_DIR), \
35+
SRC := $(TOPDIR)/src/java.xml/share/conf, \
36+
FILES := jaxp.properties jaxp-strict.properties.template, \
37+
))
2938

30-
XML_LIB_SRC := $(TOPDIR)/src/java.xml/share/conf
31-
32-
$(CONF_DST_DIR)/jaxp.properties: $(XML_LIB_SRC)/jaxp.properties
33-
$(call install-file)
34-
35-
TARGETS := $(CONF_DST_DIR)/jaxp.properties
36-
39+
TARGETS += $(COPY_XML_MODULE_CONF)
3740
################################################################################

make/test/BuildMicrobenchmark.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
9494
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
9595
SMALL_JAVA := false, \
9696
CLASSPATH := $(JMH_COMPILE_JARS), \
97-
DISABLED_WARNINGS := restricted this-escape processing rawtypes cast \
97+
DISABLED_WARNINGS := restricted this-escape processing rawtypes removal cast \
9898
serial preview dangling-doc-comments, \
9999
SRC := $(MICROBENCHMARK_SRC), \
100100
BIN := $(MICROBENCHMARK_CLASSES), \

src/java.base/share/classes/java/util/Collections.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -4050,6 +4050,7 @@ public V compute(K key,
40504050
public V merge(K key, V value,
40514051
BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
40524052
Objects.requireNonNull(remappingFunction);
4053+
typeCheck(key, value);
40534054
return m.merge(key, value, (v1, v2) -> {
40544055
V newValue = remappingFunction.apply(v1, v2);
40554056
typeCheck(null, newValue);

src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, 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
@@ -239,7 +239,7 @@ public CodeTransform asCodeTransform() {
239239
ii.isInterface());
240240
case InvokeDynamicInstruction idi ->
241241
cob.invokedynamic(DynamicCallSiteDesc.of(
242-
idi.bootstrapMethod(), idi.name().stringValue(),
242+
mapDirectMethodHandle(idi.bootstrapMethod()), idi.name().stringValue(),
243243
mapMethodDesc(idi.typeSymbol()),
244244
idi.bootstrapArgs().stream().map(this::mapConstantValue).toArray(ConstantDesc[]::new)));
245245
case NewObjectInstruction c ->

src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public enum Feature {
7373
IMPLICIT_CLASSES,
7474
@JEP(number=464, title="Scoped Values", status="Second Preview")
7575
SCOPED_VALUES,
76-
@JEP(number=462, title="Structured Concurrency", status="Second Preview")
76+
@JEP(number=480, title="Structured Concurrency", status="Third Preview")
7777
STRUCTURED_CONCURRENCY,
7878
@JEP(number=466, title="ClassFile API", status="Second Preview")
7979
CLASSFILE_API,

src/java.base/share/classes/sun/launcher/resources/launcher.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ java.launcher.X.usage=\n\
212212
\ --finalization=<value>\n\
213213
\ controls whether the JVM performs finalization of objects,\n\
214214
\ where <value> is one of "enabled" or "disabled".\n\
215-
\ Finalization is enabled by default.\n\n\
215+
\ Finalization is enabled by default.\n\
216+
\ --sun-misc-unsafe-memory-access=<value>\n\
217+
\ allow or deny usage of unsupported API sun.misc.Unsafe\n\
218+
\ <value> is one of "allow", "warn", "debug", or "deny".\n\
219+
\ The default value is "allow".\n\n\
216220
These extra options are subject to change without notice.\n
217221

218222
# Translators please note do not translate the options themselves

src/java.base/share/man/java.1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,30 @@ or directories.
11941194
.TP
11951195
\f[V]--source\f[R] \f[I]version\f[R]
11961196
Sets the version of the source in source-file mode.
1197+
.TP
1198+
\f[V]--sun-misc-unsafe-memory-acces=\f[R] \f[I]value\f[R]
1199+
Allow or deny usage of unsupported API \f[V]sun.misc.Unsafe\f[R].
1200+
\f[I]value\f[R] is one of:
1201+
.RS
1202+
.TP
1203+
\f[V]allow\f[R]
1204+
Allow use of the memory-access methods with no warnings at run time.
1205+
.TP
1206+
\f[V]warn\f[R]
1207+
Allow use of the memory-access methods, but issues a warning on the
1208+
first occasion that any memory-access method is used.
1209+
At most one warning is issued.
1210+
.TP
1211+
\f[V]debug\f[R]
1212+
Allow use of the memory-access methods, but issue a one-line warning and
1213+
a stack trace when any memory-access method is used.
1214+
.TP
1215+
\f[V]deny\f[R]
1216+
Disallow use of the memory-access methods by throwing an
1217+
\f[V]UnsupportedOperationException\f[R] on every usage.
1218+
.PP
1219+
The default value when the option is not specified is \f[V]allow\f[R].
1220+
.RE
11971221
.SH EXTRA OPTIONS FOR MACOS
11981222
.PP
11991223
The following extra options are macOS specific.

0 commit comments

Comments
 (0)