JDK-8235335 : Deprecate jcmd GC.class_stats command line option
  • Type: CSR
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 14
  • Submitted: 2019-12-04
  • Updated: 2019-12-10
  • Resolved: 2019-12-10
Related Reports
CSR :  
Description
Summary
-------

Deprecate the jcmd GC.class_stats command line option.

Problem
-------

The GC.class_stats output is not helpful for customers and has excessive output causing buffer overruns.  This feature was developed for internal use for analyzing size of metadata types for the metadata reduction project.  There are now better ways in the JVM to find this data, for example, with -Xlog:cds in the CDS dumping phase.  There are now better and less intrusive ways to implement this functionality if we wanted it for internal use.

Solution
--------

Add a deprecation message to the command line option description, and remove in a later release.

Specification
-------------

     diff --git a/src/hotspot/share/services/diagnosticCommand.hpp b/src/hotspot/share/services/diagnosticCommand.hpp
     --- a/src/hotspot/share/services/diagnosticCommand.hpp
     +++ b/src/hotspot/share/services/diagnosticCommand.hpp
     @@ -388,7 +388,7 @@
          return "GC.class_stats";
        }
        static const char* description() {
     -    return "Provide statistics about Java class meta data.";
     +    return "(Deprecated) Provide statistics about Java class meta data.";
        }
        static const char* impact() {
          return "High: Depends on Java heap size and content.";

(And update the manpage in the closed repository)

Comments
Moving to Approved.
10-12-2019

Ok, never mind. I meant that the output was intended for internal use only, even though the option is available in production.
09-12-2019

I'm not sure what you mean by it's an "internal feature". `jcmd help` shows this as an available option.
09-12-2019

Since this is an internal feature that's visible outside the VM, maybe it doesn't need a CSR?
09-12-2019