Add support for dumping the heap on OpenJ9

Closes gh-26466
This commit is contained in:
Andy Wilkinson
2021-07-30 13:37:46 +01:00
parent e30bf0e3e5
commit 64c0eceec7
3 changed files with 57 additions and 9 deletions

View File

@@ -7,7 +7,10 @@ The `heapdump` endpoint provides a heap dump from the application's JVM.
[[heapdump.retrieving]]
== Retrieving the Heap Dump
To retrieve the heap dump, make a `GET` request to `/actuator/heapdump`.
The response is binary data in https://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html[HPROF] format and can be large.
The response is binary data and can be large.
Its format depends upon the JVM on which the application is running.
When running on a HotSpot JVM the format is https://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html[HPROF]
and on OpenJ9 it is https://www.eclipse.org/openj9/docs/dump_heapdump/#portable-heap-dump-phd-format[PHD].
Typically, you should save the response to disk for subsequent analysis.
When using curl, this can be achieved by using the `-O` option, as shown in the following example: