Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roberttoyonaga
Copy link
Collaborator

Summary

This PR adds some documentation for the new jcmd support. This PR should not be merged until after #9963 is integrated.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 29, 2024
@roberttoyonaga roberttoyonaga marked this pull request as ready for review October 29, 2024 20:47
@roberttoyonaga roberttoyonaga changed the title Add some documentation for jcmd support Add documentation for jcmd support Oct 29, 2024
@roberttoyonaga
Copy link
Collaborator Author

Hi @olyagpl, now that #9963 has been integrated, can you please have a look at these documentation updates when you have time?

@olyagpl
Copy link
Member

olyagpl commented Nov 19, 2024

Hello @roberttoyonaga! Yes, gladly!

docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
docs/reference-manual/native-image/JCmd.md Show resolved Hide resolved
@olyagpl
Copy link
Member

olyagpl commented Nov 20, 2024

@roberttoyonaga, I left some rewording and cosmetic suggestions. Thank you for always finding time to contribute some documentation for a new feature!

Copy link
Member

@christianhaeubl christianhaeubl left a 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
```

Copy link
Member

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).

Copy link
Collaborator Author

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. |
Copy link
Member

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.
Copy link
Member

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.

@roberttoyonaga
Copy link
Collaborator Author

Thank you @olyagpl and @christianhaeubl for the reviews! I've applied your feedback suggestions.

Copy link
Member

@olyagpl olyagpl left a 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!

docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
```

```shell
jcmd -l
Copy link
Member

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.

Copy link
Collaborator Author

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

docs/reference-manual/native-image/JCmd.md Outdated Show resolved Hide resolved
@olyagpl
Copy link
Member

olyagpl commented Nov 26, 2024

@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
@roberttoyonaga
Copy link
Collaborator Author

Thank you for the review @olyagpl. I've squashed the commits as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native-image OCA Verified All contributors have signed the Oracle Contributor Agreement. redhat-interest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants