-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for jcmd
support
#9987
base: master
Are you sure you want to change the base?
Conversation
jcmd
supportjcmd
support
Hello @roberttoyonaga! Yes, gladly! |
@roberttoyonaga, I left some rewording and cosmetic suggestions. Thank you for always finding time to contribute some documentation for a new feature! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, I added a few comments.
```shell | ||
native-image --enable-monitoring=jcmd YourApplication | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please briefly mention jvmstat
as well (without jvmstat
support, jcmd
won't list the native image process if jcmd
is executed without any arguments).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I've added a note about jvmstat
|
||
| Name | Included with `--enable-monitoring=` | Description | | ||
|----------------------|--------------------------------------|----------------------------------------------------------------------------------------------------| | ||
| GC.heap_dump | heapdump | Generate a HPROF format dump of the Java heap. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiler.dump_code_cache
is missing here (only available with Truffle).
|
||
## Performance | ||
|
||
The adding `jcmd` support will have minimal impact on Native Image performance while idle. However, the performance impact of the `jcmd` feature greatly depends on which diagnostic commands are invoked and their frequency. For example, invoking multiple garbage collections will have a much greater impact than dumping a single native memory tracking report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention that jcmd help <cmd>
prints the impact of a command.
Thank you @olyagpl and @christianhaeubl for the reviews! I've applied your feedback suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few last suggestions.
Thank you!
``` | ||
|
||
```shell | ||
jcmd -l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only explain below how to get the PID and start jcmd
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes, I'll fix that
@roberttoyonaga, could you please also squash the commits? Your PR should be in a good shape then. |
Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> add jvmstat note, add link to jfr, add dump_code_cache Update docs/reference-manual/native-image/DebuggingAndDiagnostics.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> Update docs/reference-manual/native-image/JCmd.md Co-authored-by: Olga Gupalo <[email protected]> more fixes
25fba85
to
6fcf8dd
Compare
Thank you for the review @olyagpl. I've squashed the commits as well. |
Summary
This PR adds some documentation for the new
jcmd
support. This PR should not be merged until after #9963 is integrated.