Support heap dump summary on OpenJ9 or throw a more helpful error
prajaybasu opened this issue ยท 3 comments
HeapDump.java assumes that it is running on a HotSpot based JVM:
When the heapdump heapsummary command is executed on an OpenJ9 based JVM, an exception is thrown:
System Info: Java 15 (Eclipse OpenJ9 VM master-d4cc28f41) Host: Windows 10 10.0 (amd64)
...
[WARN]: java.lang.RuntimeException: Unable to get heap dump
[WARN]: at me.lucko.spark.common.heapdump.HeapDumpSummary.createNew(HeapDumpSummary.java:98)
[WARN]: at me.lucko.spark.common.command.modules.HeapAnalysisModule.lambda$null$0(HeapAnalysisModule.java:73)
[WARN]: at me.lucko.spark.common.command.modules.HeapAnalysisModule$$Lambda$5802/0x00000000f9c73198.run(Unknown Source)
I don't know how much effort it will be to add OpenJ9 support, but the plugin should detect if it is running on OpenJ9 and appropriately disable the command until heap dump summary support for the .PHD format can be added.
Relevant: eclipse-openj9/openj9#6593
HeapDump.java assumes that it is running on a HotSpot based JVM:
No.. it doesn't. It explicitly has a check for OpenJ9 ๐
Now.. perhaps that API has changed since, but that's an entirely different issue.
No.. it doesn't. It explicitly has a check for OpenJ9 ๐
Ah, I missed that ๐คฆ
Now.. perhaps that API has changed since, but that's an entirely different issue.
Actually, the heap dump function works just fine. Heap summary does not, however. I should have been more specific.