Skip to content

Commit ee35320

Browse files
committed
8370071: Clarify jcmd Thread.print help message
Reviewed-by: kevinw
1 parent 8c775e2 commit ee35320

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/hotspot/share/services/diagnosticCommand.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ class ThreadDumpDCmd : public DCmdWithParser {
356356
ThreadDumpDCmd(outputStream* output, bool heap);
357357
static const char* name() { return "Thread.print"; }
358358
static const char* description() {
359-
return "Print all threads with stacktraces.";
359+
return "Print all platform threads, and mounted virtual threads, "
360+
"with stack traces. The Thread.dump_to_file command will "
361+
"print all threads to a file.";
360362
}
361363
static const char* impact() {
362364
return "Medium: Depends on the number of threads.";
@@ -768,7 +770,8 @@ class ThreadDumpToFileDCmd : public DCmdWithParser {
768770
return "Thread.dump_to_file";
769771
}
770772
static const char *description() {
771-
return "Dump threads, with stack traces, to a file in plain text or JSON format.";
773+
return "Dump all threads, with stack traces, "
774+
"to a file in plain text or JSON format.";
772775
}
773776
static const char* impact() {
774777
return "Medium: Depends on the number of threads.";

src/jdk.jcmd/share/man/jcmd.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2012, 2025, 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
@@ -704,7 +704,7 @@ The following commands are available:
704704
Impact: Low
705705

706706
`Thread.dump_to_file` \[*options*\] *filepath*
707-
: Dump threads, with stack traces, to a file in plain text or JSON format.
707+
: Dump all threads, with stack traces, to a file in plain text or JSON format.
708708

709709
Impact: Medium: Depends on the number of threads.
710710

@@ -723,7 +723,8 @@ The following commands are available:
723723
- *filepath*: The file path to the output file. If %p is specified in the filename, it is expanded to the JVM's PID. (FILE, no default value)
724724

725725
`Thread.print` \[*options*\]
726-
: Prints all threads with stacktraces.
726+
: Print all platform threads, and mounted virtual threads, with stack traces.
727+
The Thread.dump_to_file command will print all threads to a file.
727728

728729
Impact: Medium --- depends on the number of threads.
729730

0 commit comments

Comments
 (0)