You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/version0.50.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
The following new features and notable changes since version 0.49.0 are included in this release:
27
27
28
28
-[New binaries and changes to supported environments](#binaries-and-supported-environments)
29
+
-[New parameter `maxstringlength` added to the `-Xtrace` option](#new-parameter-maxstringlength-added-to-the-xtrace-option)
29
30
-[New JDK 24 features](#new-jdk-24-features)
30
31
31
32
## Features and changes
@@ -38,7 +39,13 @@ OpenJDK 24 with Eclipse OpenJ9 is *not* a long term support (LTS) release.
38
39
39
40
To learn more about support for OpenJ9 releases, including OpenJDK levels and platform support, see [Supported environments](openj9_support.md).
40
41
41
-
### ###  New JDK 24 features
42
+
### New parameter `maxstringlength` added to the `-Xtrace` option
43
+
44
+
You can use the `maxstringlength` parameter of the `-Xtrace` option to specify the length of the string arguments and return values of a method that are now printed in a trace output in addition to the addresses.
45
+
46
+
For more information, see [`maxstringlength`](xtrace.md#maxstringlength).
47
+
48
+
###  New JDK 24 features
|[`-Xtrace:output=<filename>[,<size>[,<generations>]]`](#output)| Sends trace data to a file, optionally of a specific size and number of generations. |
|[`-Xtrace:suspendcount=<count>`](#suspendcount)| Suspends tracing at a thread level after a specified count. |
72
-
|[`-Xtrace:trigger=<clause>`](#trigger)| Determines when various triggered trace actions occur, including turning trace on or off. |
61
+
|[`-Xtrace:buffers=<size>[dynamic\|nodynamic]`](#buffers)| Modifies the size of buffers that are used to store trace data |
62
+
|[`-Xtrace:exception.output=<filename>[,<size>]`](#exceptionoutput)| Redirects exceptions trace data to a file |
63
+
|[`-Xtrace:maxstringlength=[<length>]`](#maxstringlength)| Specifies the length of the string arguments and the return values of the methods that are printed in addition to the string object addresses in a trace output |
|[`-Xtrace:output=<filename>[,<size>[,<generations>]]`](#output)| Sends trace data to a file, optionally of a specific size and number of generations |
66
+
|[`-Xtrace:properties[=<filename>]`](#properties)| Configures trace options based on a file |
|[`-Xtrace:suspendcount=<count>`](#suspendcount)| Suspends tracing at a thread level after a specified count |
73
+
|[`-Xtrace:trigger=<clause>`](#trigger)| Determines when various triggered trace actions occur, including turning trace on or off |
73
74
74
75
:fontawesome-solid-pencil:{: .note aria-hidden="true"} **Note:** If an option value contains commas, it must be enclosed in braces. For example: `methods={java/lang/*,com/ibm/*}`
75
76
@@ -79,14 +80,14 @@ The following parameters can be used to control tracepoint activation. (Follow l
|[`-Xtrace:external<tracepoint_specification>`](#external-tracepoint)| Routes trace data to trace listeners, which are registered by using the JVMTI APIs.|
89
-
|[`-Xtrace:none[=<tracepoint_specification>]`](#none-tracepoint)|Prevents the trace engine from loading if it is the only trace option specified.|
83
+
|[`-Xtrace:count=<tracepoint_specification>`](#count-tracepoint)| Counts the tracepoints that are used in a trace configuration|
|[`-Xtrace:external<tracepoint_specification>`](#external-tracepoint)| Routes trace data to trace listeners, which are registered by using the JVMTI APIs|
86
+
|[`-Xtrace:iprint=<tracepoint_specification>`](#iprint-tracepoint)| Prints the specified tracepoints to stderr in real time with indentation|
87
+
|[`-Xtrace:maximal=<tracepoint_specification>`](#maximal-tracepoint)| Records all associated data |
88
+
|[`-Xtrace:minimal=<tracepoint_specification>`](#minimal-tracepoint)| Records only the time stamp and tracepoint identifier|
89
+
|[`-Xtrace:none[=<tracepoint_specification>]`](#none-tracepoint)| Prevents the trace engine from loading if it is the only trace option specified |
90
+
|[`-Xtrace:print=<tracepoint_specification>`](#print-tracepoint)|Prints the specified tracepoints to stderr in real time |
90
91
91
92
:fontawesome-solid-pencil:{: .note aria-hidden="true"} **Note:** These options control which individual tracepoints are activated at run time and the implicit destination of the trace data. All these properties are independent of each other and can be mixed and matched in any way that you choose. For more information, see [Tracepoint activation](#tracepoint-activation).
92
93
@@ -478,7 +479,7 @@ This form of tracing is channeled through a single set of buffers, as opposed to
478
479
479
480
### `exception.output`
480
481
481
-
Use exceptionoutput to redirect exceptions trace data to a file.
482
+
Use `exception.output` to redirect exceptions trace data to a file.
482
483
483
484
-Xtrace:exception.output=<filename>[,<size>]
484
485
@@ -543,6 +544,45 @@ When specified, trace data is placed into internal trace buffers that can then b
543
544
544
545
`minimal` and `maximal` traces are independent from any types that follow them. For example, if the `maximal` option is specified, it does not affect a later option such as `print`.
545
546
547
+
### `maxstringlength`
548
+
549
+
(**Added in the 0.50.0 release**)
550
+
551
+
-Xtrace:maxstringlength=[<length>]
552
+
553
+
Use to specify the length of the string arguments and return values that are printed in a trace output. The range of the maximum string length that can be set is 0-128. If the length is not specified, 32 characters of the strings are printed by default along with the addresses. If `maxstringlength=0`, only the string addresses are printed instead.
554
+
555
+
This parameter is used with other method tracing options, such as `-Xtrace:methods={java/lang/String.concat'()'}` and affects only those tracing operations where addresses are printed for string arguments and return values. When using such method tracing options, the argument is passed to the function as a string and the value is returned as a string. Earlier, you could not capture the contents of the string arguments and return values, only the address of the string object was printed. Now, both the actual strings as well as the addresses can be printed.
556
+
557
+
#### Examples
558
+
559
+
Default behavior - Address and 32 string characters
12:37:52.935 0x25a00 mt.18 - this: java/lang/String@00000006049B84B8 method arguments: ((String)"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula "...)
583
+
12:37:52.935 0x25a00 mt.28 - return value: java/lang/String@00000007FFF92AE0 - (String)"HelloLorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo li"...
584
+
```
585
+
546
586
### `methods`
547
587
548
588
Using method trace provides a complete and potentially large diagnosis of code paths inside your application and the system classes. Use wild cards and filtering to control method trace so that you can focus on the sections of code that interest you. Note that method trace is powerful but it also has a cost. Application throughput is affected by method trace.
0 commit comments