Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/hotspot/share/services/diagnosticCommand.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ class ThreadDumpDCmd : public DCmdWithParser {
ThreadDumpDCmd(outputStream* output, bool heap);
static const char* name() { return "Thread.print"; }
static const char* description() {
return "Print all threads with stacktraces.";
return "Print all platform threads, and mounted virtual threads, "
"with stack traces. The Thread.dump_to_file command will "
"print all threads to a file.";
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still in two minds about having it mention Thread.dump_to_file. If it is mentioned then it would be better to put in a line break and use "may be used to" that rather than "will".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes - happy to tweak this in follow on issue if necessary. I think it reads fine as is but let me know the final format and I'll file a new PR.

}
static const char* impact() {
return "Medium: Depends on the number of threads.";
Expand Down Expand Up @@ -768,7 +770,8 @@ class ThreadDumpToFileDCmd : public DCmdWithParser {
return "Thread.dump_to_file";
}
static const char *description() {
return "Dump threads, with stack traces, to a file in plain text or JSON format.";
return "Dump all threads, with stack traces, "
"to a file in plain text or JSON format.";
}
static const char* impact() {
return "Medium: Depends on the number of threads.";
Expand Down
7 changes: 4 additions & 3 deletions src/jdk.jcmd/share/man/jcmd.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -704,7 +704,7 @@ The following commands are available:
Impact: Low

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

Impact: Medium: Depends on the number of threads.

Expand All @@ -723,7 +723,8 @@ The following commands are available:
- *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)

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

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

Expand Down