Skip to content

Commit

Permalink
8279047: Remove expired flags in JDK 20
Browse files Browse the repository at this point in the history
Reviewed-by: kvn, kbarrett, alanb
  • Loading branch information
David Holmes committed Jun 11, 2022
1 parent f7a4be7 commit d46f404
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 46 deletions.
15 changes: 5 additions & 10 deletions src/hotspot/share/runtime/arguments.cpp
Expand Up @@ -536,13 +536,6 @@ static SpecialFlag const special_jvm_flags[] = {
{ "DynamicDumpSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
{ "RequireSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
{ "UseSharedSpaces", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::undefined() },
#ifdef PRODUCT
{ "UseHeavyMonitors", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::jdk(20) },
#endif
{ "ExtendedDTraceProbes", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "UseContainerCpuShares", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "PreferContainerQuotaForCPUCount", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "AliasLevel", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },

// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
Expand All @@ -551,9 +544,11 @@ static SpecialFlag const special_jvm_flags[] = {

// -------------- Obsolete Flags - sorted by expired_in --------------

{ "FilterSpuriousWakeups", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::jdk(20) },
{ "MinInliningThreshold", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::jdk(20) },
{ "PrefetchFieldsAhead", JDK_Version::undefined(), JDK_Version::jdk(19), JDK_Version::jdk(20) },
{ "ExtendedDTraceProbes", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "UseContainerCpuShares", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "PreferContainerQuotaForCPUCount", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },
{ "AliasLevel", JDK_Version::jdk(19), JDK_Version::jdk(20), JDK_Version::jdk(21) },

#ifdef ASSERT
{ "DummyObsoleteTestFlag", JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::undefined() },
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/globals.hpp
Expand Up @@ -1066,7 +1066,7 @@ const intx ObjectAlignmentInBytes = 8;
product(bool, ErrorFileToStdout, false, \
"If true, error data is printed to stdout instead of a file") \
\
product(bool, UseHeavyMonitors, false, \
develop(bool, UseHeavyMonitors, false, \
"(Deprecated) Use heavyweight instead of lightweight Java " \
"monitors") \
\
Expand Down
61 changes: 27 additions & 34 deletions src/java.base/share/man/java.1
Expand Up @@ -22,7 +22,7 @@
.\"t
.\" Automatically generated by Pandoc 2.3.1
.\"
.TH "JAVA" "1" "2022" "JDK 19\-ea" "JDK Commands"
.TH "JAVA" "1" "2022" "JDK 20\-ea" "JDK Commands"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -181,7 +181,7 @@ with new values added and old values removed.
You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that is
no longer supported.
The supported values of \f[I]N\f[R] are the current Java SE release
(\f[CB]19\f[R]) and a limited number of previous releases, detailed in the
(\f[CB]20\f[R]) and a limited number of previous releases, detailed in the
command\-line help for \f[CB]javac\f[R], under the \f[CB]\-\-source\f[R] and
\f[CB]\-\-release\f[R] options.
.RE
Expand Down Expand Up @@ -268,7 +268,7 @@ The source file should contain one or more top\-level classes, the first
of which is taken as the class to be executed.
.IP \[bu] 2
The compiler does not enforce the optional restriction defined at the
end of JLS ??7.6, that a type in a named package should exist in a file
end of JLS 7.6, that a type in a named package should exist in a file
whose name is composed from the type name followed by the
\f[CB]\&.java\f[R] extension.
.IP \[bu] 2
Expand Down Expand Up @@ -467,12 +467,12 @@ and file name of the library.
.RE
.TP
.B \f[CB]\-\-class\-path\f[R] \f[I]classpath\f[R], \f[CB]\-classpath\f[R] \f[I]classpath\f[R], or \f[CB]\-cp\f[R] \f[I]classpath\f[R]
Specifies a list of directories, JAR archives, and ZIP archives to search
Specifies a list of directories, JAR files, and ZIP archives to search
for class files.
.RS
.PP
On Windows, semicolons (\f[CB];\f[R]) separate entities in this list;
on other platforms it is a colon (\f[CB]:\f[R]).
On Windows, semicolons (\f[CB];\f[R]) separate entities in this list; on
other platforms it is a colon (\f[CB]:\f[R]).
.PP
Specifying \f[I]classpath\f[R] overrides any setting of the
\f[CB]CLASSPATH\f[R] environment variable.
Expand Down Expand Up @@ -802,8 +802,8 @@ Specifies a list of directories, JAR files, and ZIP archives to append
to the end of the default bootstrap class path.
.RS
.PP
On Windows, semicolons (\f[CB];\f[R]) separate entities in this list;
on other platforms it is a colon (\f[CB]:\f[R]).
On Windows, semicolons (\f[CB];\f[R]) separate entities in this list; on
other platforms it is a colon (\f[CB]:\f[R]).
.RE
.TP
.B \f[CB]\-Xcheck:jni\f[R]
Expand Down Expand Up @@ -1151,8 +1151,8 @@ continues.
Sets the thread stack size (in bytes).
Append the letter \f[CB]k\f[R] or \f[CB]K\f[R] to indicate KB, \f[CB]m\f[R] or
\f[CB]M\f[R] to indicate MB, or \f[CB]g\f[R] or \f[CB]G\f[R] to indicate GB.
The actual size may be rounded up to a multiple of the system page size as
required by the operating system.
The actual size may be rounded up to a multiple of the system page size
as required by the operating system.
The default value depends on the platform:
.RS
.IP \[bu] 2
Expand Down Expand Up @@ -4053,17 +4053,6 @@ Example:
\f[CB]\-Xlog:gc:garbage\-collection.log\f[R]
.RE
.TP
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R]
\f[B]Linux and macOS:\f[R] Enables additional \f[CB]dtrace\f[R] tool probes
that affect performance.
By default, this option is disabled and \f[CB]dtrace\f[R] performs only
standard probes.
Use the combination of these flags instead:
\f[CB]\-XX:+DTraceMethodProbes\f[R], \f[CB]\-XX:+DTraceAllocProbes\f[R],
\f[CB]\-XX:+DTraceMonitorProbes\f[R].
.RS
.RE
.TP
.B \f[CB]\-XX:+FlightRecorder\f[R]
Enables the use of Java Flight Recorder (JFR) during the runtime of the
application.
Expand Down Expand Up @@ -4123,26 +4112,27 @@ This option was deprecated in JDK 16 by \f[B]JEP 396\f[R]
\f[B]JEP 403\f[R] [https://openjdk.java.net/jeps/403].
.RS
.RE
.SH REMOVED JAVA OPTIONS
.PP
These \f[CB]java\f[R] options have been removed in JDK 19 and using them
results in an error of:
.RS
.PP
\f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
.RE
.TP
.B \f[CB]\-XX:+UseBiasedLocking\f[R]
Enables the use of biased locking.
Some applications with significant amounts of uncontended
synchronization may attain significant speedups with this flag enabled,
but applications with certain patterns of locking may see slowdowns.
.B \f[CB]\-XX:+ExtendedDTraceProbes\f[R]
\f[B]Linux and macOS:\f[R] Enables additional \f[CB]dtrace\f[R] tool probes
that affect performance.
By default, this option is disabled and \f[CB]dtrace\f[R] performs only
standard probes.
Use the combination of these flags instead:
\f[CB]\-XX:+DTraceMethodProbes\f[R], \f[CB]\-XX:+DTraceAllocProbes\f[R],
\f[CB]\-XX:+DTraceMonitorProbes\f[R].
.RS
.RE
.SH REMOVED JAVA OPTIONS
.PP
No documented java options have been removed in JDK 20.
.PP
For the lists and descriptions of options removed in previous releases
see the \f[I]Removed Java Options\f[R] section in:
.IP \[bu] 2
\f[B]The \f[BC]java\f[B] Command, Release 19\f[R]
[https://docs.oracle.com/en/java/javase/19/docs/specs/man/java.html]
.IP \[bu] 2
\f[B]The \f[BC]java\f[B] Command, Release 18\f[R]
[https://docs.oracle.com/en/java/javase/18/docs/specs/man/java.html]
.IP \[bu] 2
Expand Down Expand Up @@ -4657,6 +4647,7 @@ decorations.
(\f[CB]l\f[R]), \f[CB]tags\f[R] (\f[CB]tg\f[R]) decorators can also be
specified as \f[CB]none\f[R] for no decoration.
.PP
Logging Messages Decorations
.TS
tab(@);
lw(14.9n) lw(55.1n).
Expand Down Expand Up @@ -4730,6 +4721,7 @@ T}
.TE
.SS Convert GC Logging Flags to Xlog
.PP
Legacy GC Logging Flags to Xlog Configuration Mapping
.TS
tab(@);
lw(22.4n) lw(16.5n) lw(31.2n).
Expand Down Expand Up @@ -4883,6 +4875,7 @@ These legacy flags are no longer recognized and will cause an error if
used directly.
Use their unified logging equivalent instead.
.PP
Runtime Logging Flags to Xlog Configuration Mapping
.TS
tab(@);
lw(15.0n) lw(20.2n) lw(34.7n).
Expand Down
8 changes: 8 additions & 0 deletions test/jdk/java/lang/Thread/virtual/HoldsLock.java
Expand Up @@ -28,6 +28,14 @@
* @modules java.base/java.lang:+open
* @compile --enable-preview -source ${jdk.version} HoldsLock.java
* @run testng/othervm --enable-preview HoldsLock
*/

/**
* @test
* @summary Test Thread.holdsLock when lock held by carrier thread
* @requires vm.continuations & vm.debug
* @modules java.base/java.lang:+open
* @compile --enable-preview -source ${jdk.version} HoldsLock.java
* @run testng/othervm --enable-preview -XX:+UseHeavyMonitors HoldsLock
*/

Expand Down
Expand Up @@ -49,8 +49,9 @@
* @test
* @summary Exercise multithreaded maps, using only heavy monitors.
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch == "ppc64" | os.arch == "ppc64le" | os.arch == "riscv64"
* @requires vm.debug
* @library /test/lib
* @run main/othervm/timeout=1600 -XX:+IgnoreUnrecognizedVMOptions -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
* @run main/othervm/timeout=1600 -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
*/

import static java.util.concurrent.TimeUnit.MILLISECONDS;
Expand Down

1 comment on commit d46f404

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.