RFR: JDK-8260571: Add PrintMetaspaceStatistics to print metaspace statistics upon VM exit

Coleen Phillimore coleenp at openjdk.java.net
Mon Feb 1 20:59:47 UTC 2021


On Mon, 1 Feb 2021 20:49:57 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This patch adds a new diagnostic boolean switch `PrintMetaspaceStatistics`. When set, it will cause the VM to print a brief report about metaspace occupancy when exiting. It follows the same logic as `PrintNMTStatistics` and similar switches.
>
> Looks good to me.

I agree with Thomas.  I think there's a way to make UL not print the decorations with these Print<Stuff>AtExit, but otherwise the decorations are noisy.  We purposefully didn't not translate the options that print a lot of output to UL because the decorations and the timestamps aren't interesting. eg. PrintSystemDictionaryAtExit or PrintInterpreter.  If someone wants to change this so that these options suppress decorations and translate to UL, we can change metspace printing at exit also.  As a diagnostic flag, there isn't any promise of it's longevity in the code. ie. we can change it if we want.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2283


More information about the hotspot-runtime-dev mailing list