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

CMS: verbose:gc information

XMLWordPrintable

    • gc
    • x86, sparc
    • solaris, windows_2000

      Name: rmT116609 Date: 10/22/2003


      A DESCRIPTION OF THE REQUEST :
      Since version 1.4.2 the JVM has been printing GC lines for the CMS (Concurrent Mark Sweep) collector also into the GC logfile
      created by the -Xloggc option. This is good because earlier versions had written these extra traces to standard output only and
      thereby separated traces for normal GC activity and CMS activity.
      The problem with this new feature is that there is no explicit hint to which collector type has written the line. It has to be guessed
      from the structure of the line.

      JUSTIFICATION :
      Whenever you want to process -Xloggc output automatically to monitor and quantify GC activity you
      would like to know as much as possible about the kind of operation taking place. It is essential, for example, to distinguish
      GC in new and old generation. This is possible as GC in new generation heap usually prints a line containing the substring
      'GC' and GC in old generation prints a line containing 'Full GC'. Now, CMS also operates in old generation but does not tell
      this explicitly in the GC output line it produces. With CMS there is the additional problem that several output lines belong to the
      same CMS run and you want to sort them out.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Similar to the lines printed by the CMS collector with -Xloggc:<filename> -XX:+PrintGCDetails, e.g.
      1.998: [GC [1 CMS-initial-mark: 42338K(61440K)] 46244K(65472K), 0.0005249 secs]
      you would like to find a hint to CMS also in the short-hand written by -Xloggc only.
      The desired short-hand line would look similar to the following:
      1.841: [CMS GC 45867K(65472K), 0.0005076 secs]
      ACTUAL -
      The actual line written by the -Xloggc option (without -XX:+PrintGCDetails) looks like the following:
      1.841: [GC 45867K(65472K), 0.0005076 secs]
      There is no explicit hint which helps you to distinguish it from a new generation GC trace. You have to
      parse its structure and note the absence of a '->' substring to find out it actually could be a CMS trace.

      ---------- BEGIN SOURCE ----------
      Run any garbage producing Java program with the following command line options:
      java -Xms64m -Xmx64m -Xloggc:gc.out -XX:+UseConcMarkSweepGC.

      You will find shorter traces in pairs among the longer ones. These are the CMS traces which are difficult to detect.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Run -Xloggc in combination with -XX:+PrintGCDetails. This will add explicit information to lines written by the CMS collector.
      (Incident Review ID: 216730)
      ======================================================================
      ###@###.### 10/9/04 00:18 GMT

            ysr Y. Ramakrishna
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: