RFR(xs): 8227031: Print NMT statistics on fatal errors

Thomas Stüfe thomas.stuefe at gmail.com
Thu Jul 4 14:12:20 UTC 2019


Hi all,

We have -XX:+-PrintNMTStatistics, a very useful switch which will cause the
VM to print out the NMT statistics if the VM exits normally.

Currently it does not work if the VM exits due to a fatal error. But
especially in fatal exits due to native OOM a NMT report would be very
helpful.

JBS: https://bugs.openjdk.java.net/browse/JDK-8227031

cr:
http://cr.openjdk.java.net/~stuefe/webrevs/8227031-optionally-print-nmt-report-on-oom/webrev.00/webrev/index.html

Changes in this patch:
- handle PrintNMTStatistics on fatal error
- make sure the final report is not called twice accidentally and it is not
called recursively due to secondary error handling
- change the Metaspace report portion of the NMT report to only include the
brief metaspace report - that one can be called at any time, it does not
lock nor require any resources.

Please note: this will not work when we are in an OOM situation and request
a detailed NMT report; that scenario needs more work since NMT detailed
reports need memory as well. That is a separate issue.

Thanks, Thomas


More information about the hotspot-runtime-dev mailing list