Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit a5bf5e0

Browse files
author
David Holmes
committed
8266614: update manpage for -Xlog:async
Reviewed-by: hseigel, xliu
1 parent f69e2d5 commit a5bf5e0

File tree

1 file changed

+42
-82
lines changed

1 file changed

+42
-82
lines changed

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

Lines changed: 42 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ By default this option is disabled.
13101310
.RS
13111311
.RE
13121312
.TP
1313-
.B \f[CB]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] (or)\f[CB]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
1313+
.B \f[CB]\-XX:FlightRecorderOptions=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R] (or)\f[CB]\-XX:FlightRecorderOptions:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
13141314
Sets the parameters that control the behavior of JFR.
13151315
.RS
13161316
.PP
@@ -1636,7 +1636,7 @@ By default, this option is disabled.
16361636
.RS
16371637
.RE
16381638
.TP
1639-
.B \f[CB]\-XX:StartFlightRecording:\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
1639+
.B \f[CB]\-XX:StartFlightRecording=\f[R]\f[I]parameter\f[R]\f[CB]=\f[R]\f[I]value\f[R]
16401640
Starts a JFR recording for the Java application.
16411641
This option is equivalent to the \f[CB]JFR.start\f[R] diagnostic command
16421642
that starts a recording during runtime.
@@ -1757,22 +1757,6 @@ is needed.
17571757
.PP
17581758
You can specify values for multiple parameters by separating them with a
17591759
comma.
1760-
.PP
1761-
Event settings and .jfc options can also be specified using the following
1762-
syntax:
1763-
.TP
1764-
.B \f[CB]option=\f[R]\f[I]value\f[R]
1765-
Specifies the option value to modify. To list available options, use the
1766-
JAVA_HOME/bin/jfr tool.
1767-
.TP
1768-
.B \f[CB]event-setting=\f[R]\f[I]value\f[R]
1769-
Specifies the event setting value to modify. Use the form:
1770-
<event-name>#<setting-name>=<value>
1771-
To add a new event setting, prefix the event name with '+'.
1772-
.PP
1773-
In case of a conflict between a parameter and a .jfc option, the parameter
1774-
will take precedence. The whitespace delimiter can be omitted for timespan values, i.e. 20ms. For
1775-
more information about the settings syntax, see Javadoc of the jdk.jfr package.
17761760
.RE
17771761
.TP
17781762
.B \f[CB]\-XX:ThreadStackSize=\f[R]\f[I]size\f[R]
@@ -3888,68 +3872,6 @@ future JDK release.
38883872
They\[aq]re still accepted and acted upon, but a warning is issued when
38893873
they\[aq]re used.
38903874
.TP
3891-
.B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R]
3892-
When present at run time, \f[CB]\-\-illegal\-access=\f[R] takes a keyword
3893-
\f[I]parameter\f[R] to specify a mode of operation:
3894-
.RS
3895-
.RS
3896-
.PP
3897-
\f[B]Note:\f[R] This option will be removed in a future release.
3898-
.RE
3899-
.IP \[bu] 2
3900-
\f[CB]permit\f[R]: This mode opens each package in each module in the
3901-
run\-time image to code in all unnamed modules ( such as code on the
3902-
class path), if that package existed in JDK 8.
3903-
This enables both static access, (for example, by compiled bytecode, and
3904-
deep reflective access) through the platform\[aq]s various reflection
3905-
APIs.
3906-
The first reflective\-access operation to any such package causes a
3907-
warning to be issued.
3908-
However, no warnings are issued after the first occurrence.
3909-
This single warning describes how to enable further warnings.
3910-
.IP \[bu] 2
3911-
\f[CB]warn\f[R]: This mode is identical to \f[CB]permit\f[R] except that a
3912-
warning message is issued for each illegal reflective\-access operation.
3913-
.IP \[bu] 2
3914-
\f[CB]debug\f[R]: This mode is identical to \f[CB]warn\f[R] except that both
3915-
a warning message and a stack trace are issued for each illegal
3916-
reflective\-access operation.
3917-
.IP \[bu] 2
3918-
\f[CB]deny\f[R]: This mode disables all illegal\-access operations except
3919-
for those enabled by other command\-line options, such as
3920-
\f[CB]\-\-add\-opens\f[R].
3921-
This mode is the default.
3922-
.PP
3923-
If your application does not work with the default mode of
3924-
\f[CB]\-\-illegal\-access=deny\f[R] then you can learn more about what is
3925-
going on with the \f[CB]warn\f[R] and \f[CB]debug\f[R] modes.
3926-
For each library or framework on the class path that requires illegal
3927-
access, you have two options:
3928-
.IP \[bu] 2
3929-
If the component\[aq]s maintainers have already released a fixed version
3930-
that no longer uses JDK\-internal APIs then you can consider upgrading
3931-
to that version.
3932-
.IP \[bu] 2
3933-
If the component still needs to be fixed, then you can contact its
3934-
maintainers and ask them to replace their use of JDK\-internal APIs with
3935-
the proper exported APIs.
3936-
.PP
3937-
If you must continue to use a component that requires illegal access,
3938-
then you can eliminate the warning messages by using one or more
3939-
\f[CB]\-\-add\-opens\f[R] options to open only those internal packages to
3940-
which access is required.
3941-
.PP
3942-
To verify that your application is ready for a future version of the
3943-
JDK, run it with \f[CB]\-\-illegal\-access=deny\f[R] along with any
3944-
necessary \f[CB]\-\-add\-opens\f[R] options.
3945-
Any remaining illegal\-access errors will most likely be due to static
3946-
references from compiled code to JDK\-internal APIs.
3947-
You can identify those by running the \f[B]jdeps\f[R] tool with the
3948-
\f[CB]\-\-jdk\-internals\f[R] option.
3949-
For performance reasons, the current JDK does not issue warnings for
3950-
illegal static\-access operations.
3951-
.RE
3952-
.TP
39533875
.B \f[CB]\-Xfuture\f[R]
39543876
Enables strict class\-file format checks that enforce close conformance
39553877
to the class\-file format specification.
@@ -4032,8 +3954,16 @@ By default, this option is disabled.
40323954
.PP
40333955
These \f[CB]java\f[R] options are still accepted but ignored, and a
40343956
warning is issued when they\[aq]re used.
4035-
.PP
4036-
None in JDK 17.
3957+
.TP
3958+
.B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R]
3959+
Controlled \f[I]relaxed strong encapsulation\f[R], as defined in \f[B]JEP
3960+
261\f[R]
3961+
[https://openjdk.java.net/jeps/261#Relaxed\-strong\-encapsulation].
3962+
This option was deprecated in JDK 16 by \f[B]JEP 396\f[R]
3963+
[https://openjdk.java.net/jeps/396] and made obsolete in JDK 17 by
3964+
\f[B]JEP 403\f[R] [https://openjdk.java.net/jeps/403].
3965+
.RS
3966+
.RE
40373967
.SH REMOVED JAVA OPTIONS
40383968
.PP
40393969
These \f[CB]java\f[R] options have been removed in JDK 17 and using them
@@ -4374,6 +4304,8 @@ the Java Virtual Machine (JVM) unified logging framework.
43744304
.RS
43754305
.PP
43764306
\f[CB]\-Xlog\f[R][\f[CB]:\f[R][\f[I]what\f[R]][\f[CB]:\f[R][\f[I]output\f[R]][\f[CB]:\f[R][\f[I]decorators\f[R]][\f[CB]:\f[R]\f[I]output\-options\f[R][\f[CB],\f[R]...]]]]]
4307+
.PP
4308+
\f[CB]\-Xlog:\f[R]\f[I]directive\f[R]
43774309
.RE
43784310
.TP
43794311
.B \f[I]what\f[R]
@@ -4404,6 +4336,11 @@ See \f[B]Decorations\f[R].
44044336
Sets the \f[CB]\-Xlog\f[R] logging output options.
44054337
.RS
44064338
.RE
4339+
.TP
4340+
.B \f[I]directive\f[R]
4341+
A global option or subcommand: help, disable, async
4342+
.RS
4343+
.RE
44074344
.SS Description
44084345
.PP
44094346
The Java Virtual Machine (JVM) unified logging framework provides a
@@ -4554,6 +4491,29 @@ Specifying \f[CB]filecount=0\f[R] means that the log file shouldn\[aq]t be
45544491
rotated.
45554492
There\[aq]s a possibility of the pre\-existing log file getting
45564493
overwritten.
4494+
.SS \-Xlog Output Mode
4495+
.PP
4496+
By default logging messages are output synchronously \- each log message
4497+
is written to the designated output when the logging call is made.
4498+
But you can instead use asynchronous logging mode by specifying:
4499+
.TP
4500+
.B \f[CB]\-Xlog:async\f[R]
4501+
Write all logging asynchronously.
4502+
.RS
4503+
.RE
4504+
.PP
4505+
In asynchronous logging mode, log sites enqueue all logging messages to
4506+
an intermediate buffer and a standalone thread is responsible for
4507+
flushing them to the corresponding outputs.
4508+
The intermediate buffer is bounded and on buffer exhaustion the
4509+
enqueuing message is discarded.
4510+
Log entry write operations are guaranteed non\-blocking.
4511+
.PP
4512+
The option \f[CB]\-XX:AsyncLogBufferSize=N\f[R] specifies the memory
4513+
budget in bytes for the intermediate buffer.
4514+
The default value should be big enough to cater for most cases.
4515+
Users can provide a custom value to trade memory overhead for log
4516+
accuracy if they need to.
45574517
.SS Decorations
45584518
.PP
45594519
Logging messages are decorated with information about the message.

0 commit comments

Comments
 (0)