JDK-8223575 : add subspace transitions to gc+metaspace=info log lines
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-08
  • Updated: 2022-06-10
  • Resolved: 2019-07-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 14 Other
11.0.17-oracleFixed 14 b05Fixed naFixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Currently, gc+metaspace=info log lines look like this:

[60.082s][info ][gc,metaspace     ] GC(24) Metaspace: 2209K->2209K(1056768K)

When coops are enabled, this can be confusing as users wonder why they asked for, say, 128M for the metaspace and the log is reporting over 1G. I think it will be valuable to also report the transitions of the metaspace subspaces (at least, when coops are enabled) so that users can get more accurate information about the space they are sizing. I propose the output to look something like this:

[8.999s][info][gc,metaspace     ] GC(7) Metaspace: 2130K->2130K(1056768K) ClassMetadata: 1906K->1906K(8192K) ClassSpace: 223K->223K(1048576K)

(I'm open to suggestions on what to call "ClassMetadata" and "ClassSpace")
Comments
Fix request [11u] I backport this for parity with 11.0.16-oracle. Low risk, changes tracing only. I had to resolve one file and port the change to Shenandoah SAP nighlty testing passed.
08-06-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1126 Date: 2022-06-07 12:29:39 +0000
07-06-2022

Git URL: https://github.com/openjdk/jdk/commit/dacaff48e2545192e32bb441c15f40c3a7b587d2
07-06-2022

URL: https://hg.openjdk.java.net/jdk/client/rev/4d193e40e7af User: psadhukhan Date: 2019-07-24 07:24:52 +0000
24-07-2019

Thomas, Nevermind, I just saw your e-mail. Thanks for the explanation.
05-07-2019

Thanks Thomas. This happened because it was still targeted to 13 when I pushed it to 14?
05-07-2019

Originally closed as "backport" with JDK-8227220.
04-07-2019