Integrated: 8286983: rename jdb -trackvthreads and debug agent enumeratevthreads options and clarify "Preview Feature" nature of these options

Chris Plummer cjplummer at openjdk.java.net
Tue Jun 7 19:10:02 UTC 2022


On Thu, 19 May 2022 00:10:15 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> As part of the loom integration, jdb added `-trackvthreads` and the debug agent added `enumeratevthreads`. These options are being renamed to `-trackallthreads` and `includevirtualthreads` (the shorthand `vthreads` should not have been used). Also, the help text for these options now calls out that virtual threads are a Preview Feature.
> 
> After the update to help text, wlil look as follows:
> 
> jdb doc (search for "trackallthreads"): http://cr.openjdk.java.net/~cjplummer/8286983/jdb.html
> debug agent doc (seach for "includevirtualthreads"): http://cr.openjdk.java.net/~cjplummer/8286983/conninv.html
> 
> 
> $ jdb -listconnectors
> ...
>   Connector: com.sun.jdi.CommandLineLaunch  Transport: dt_socket
>     description: Launches target using Sun Java VM command line and attaches to it
> ...
>     Argument: includevirtualthreads Default value: n
>     description: List of all threads includes virtual threads as well as platform threads. Virtual threads are a preview feature of the Java platform.
> 
> 
> 
> $ jdb -help
> Usage: jdb <options> <class> <arguments>
> 
> where options include:
> ...
>     -dbgtrace [flags] print info for debugging jdb
>     -trackallthreads  Track all threads, including virtual threads.
>                       Virtual threads are a preview feature of the Java platform.
>     -tclient          run the application in the HotSpot(TM) Client Compiler
> ...
> 
> 
> 
> $ man -M ./build/linux-x64-debug/images/jdk/man/ jdb
> ...
>        -tclient
>               Runs the application in the Java HotSpot VM client.
> 
>        -trackallthreads
>               Track  all  threads  as  they  are  created,  including  Virtual
>               Threads.   See  Working  With  Virtual  Threads  below.  Virtual
>               threads are a preview feature of the Java platform.
> 
>        -tserver
>               Runs the application in the Java HotSpot VM server.
> ...
> WORKING WITH VIRTUAL THREADS
>        Virtual threads are a preview feature of the  Java  platform.   Preview
>        features  may  be removed in a future release, or upgraded to permanent
>        features of the Java platform.
> 
>        Often virtual theads are created in such large  numbers  and  frequency
> ...
> 
> 
> 
> $ java -agentlib:jdwp=help
>                Java Debugger JDWP Agent Library
>                --------------------------------
> 
>   (See the "VM Invocation Options" section of the JPDA
>    "Connection and Invocation Details" document for more information.)
> 
> jdwp usage: java -agentlib:jdwp=[help]|[<option>=<value>, ...]
> 
> Option Name and Value            Description                       Default
> ---------------------            -----------                       -------
> ...
> timeout=<timeout value>          for listen/attach in milliseconds n
> includevirtualthreads=y|n        List of all threads includes virtual threads as well as platform threads.
>                                  Virtual threads are a preview feature of the Java platform.
>                                                                    n
> mutf8=y|n                        output modified utf-8             n
> ...

This pull request has now been integrated.

Changeset: 74be2d9e
Author:    Chris Plummer <cjplummer at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/74be2d9ef6d5a8c27257c86cf73decf440a4b292
Stats:     41 lines in 13 files changed: 9 ins; 0 del; 32 mod

8286983: rename jdb -trackvthreads and debug agent enumeratevthreads options and clarify "Preview Feature" nature of these options

Reviewed-by: amenkov, lmesnik, alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/8780


More information about the serviceability-dev mailing list