Open pdbain-ibm opened 5 years ago
Example to iterate through head for class_histogram
:
https://github.com/eclipse/openj9/blob/7a369a8ffe67207767a698266c679f0f2b3da9cb/runtime/jvmti/jvmtiHeap.c#L1278
To do:
help
to get a list of jcmd
operationsIs there a milestone target for this one please?
@pshipton or @DanHeidinga
I can put this together fairly rapidly now that jmap
is done, though I should finish the jstack
refactoring first.
+1 to finishing jstack first
@SueChaplain Given the branch for the 0.15 release is June 24, I don't think this will make it. I'll tentatively tag it against the 0.16.0
release.
Hello,
I don't know if there's a way for vote for an issue, but any here my +1 on this one: people used to jcmd
are quite upset not to find it in OpenJ9...
Kind regards, Alexandre
@avermeer thanks for the feedback. jcmd
is definitely on the list. Our plan, as written in https://github.com/eclipse/openj9/issues/4655, is to do jps (done), jstack (done), and then jmap & jstat.
Once those two are complete we'll implement jcmd
as its basically a different front end to the same functionality
jmap
is also available now (in nightly builds and the next release), at least the -histo
part.
@DanHeidinga jcmd
provides a useful feature not available elsewhere, the ability to create dumps on the fly. We should consider adding this next. Unless the -Xdump option has been pre-configured to create the dumps you need (how are you supposed to know which dumps you need in advance?), there is no easy way to create a heapdump, snapdump, systemdump on the fly (except by writing an agent and late attaching it).
I don't have a problem with doing jcmd
first. The backend for jstat
will need to be written as part of which ever command we do first
@pshipton I completed agree with you, we quite miss an equivalent to GC.heap_dump as people usually resort to this kind of tool when something's going wrong and thus may not have pre-existing -Xdump options.
I've updated #4655 to indicate jcmd
should be next
We plan to do this in several steps:
jcmd
which adds the basic capabilities of the tool such as help and listing VMs, plus supporting the capabilities of jstack
and jmap
(which were designed to be jcmd-compatible). Omit certain features of jcmd
, such as handling vmid=0, selecting VMs by main class, or reading commands from a filejcmd
features note in 1): issue https://github.com/eclipse/openj9/issues/6521I have phase 1 working and plan to send it for review today: https://github.com/eclipse/openj9/pull/6513
@SueChaplain documentation issue is https://github.com/eclipse/openj9-docs/issues/333.
FYI @pdbain
Pull request for jcmd Dump.[heap, java, snap, system] opened: https://github.com/eclipse/openj9/pull/6702. FYI @avermeer .
@pdbain-ibm thank you very much for this notification, couple of people in my organization got in touch with me asking for this, so it's good to see progress here.
When do you think OpenJ9 nightly build at https://adoptopenjdk.net/ could include this pull request?
Kind regards, Alexandre Vermeerbergen
When do you think OpenJ9 nightly build at https://adoptopenjdk.net/ could include this pull request?
That depends on how long it takes to have it reviewed. @keithc-ca could you take a look?
If you want a build sooner, I can brew one up for you on MacOS or Linux X86 and deliver it privately.
Our jenkins is migrating to new infrastructure and not all the kinks have been worked out yet. Until then, PR builds are not available and very little is likely to be merged.
Our jenkins is migrating to new infrastructure and not all the kinks have been worked out yet. Until then, PR builds are not available and very little is likely to be merged.
Thanks, Keith. FYI, I ran an all-platform extended functional tes build on the internal Jenkins farm. I look forward to your review comments.
@avermeer the dump commands have been added and should be available in the nightly builds shortly. Note that the availability of the various jcmd
commands depends on the version of the target JVM, not of jcmd
, so if the application is running an older JVM it may not support the Dump
commands.
FYI, as of next week my preferred Github user ID will be @pdbain .
Hello @pdbain-ibm,
Thank you very much for this update.I'll check the upcoming nightly builds. Regarding the "age of the JVM", are you referring to the age of OpenJ9 build, or say Java 8 vs Java 11 ?
Kind regards, Alexandre Vermeerbergen
I refer to the vintage of the OpenJ9 source. The tool will work equally on any Java specification level.
This is part of https://github.com/eclipse/openj9/issues/4655.
jcmd
jcmd
-specific instruction to the target VMOther options:
-l
option to list processes (likejps
)<file>
: read commands from<file>
Specific commands:
<command>
help: print help for<command>