Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235335

Deprecate jcmd GC.class_stats command line option

    XMLWordPrintable

Details

    • behavioral
    • minimal
    • Customers who have used this jcmd have privileged external control of their Java application and can remove uses of this command line option to jcmd.
    • add/remove/modify command line option
    • Implementation

    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)

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              coleenp Coleen Phillimore
              Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: