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

REGRESSION:JVMPI_GC_CLASS_DUMP records not provided for all classes in heap dump

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      Name: rmT116609 Date: 09/10/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
      Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode, sharing)


      FULL OS VERSION :
      Windows XP SP 1

      A DESCRIPTION OF THE PROBLEM :
      Previous versions used to provide JVMPI_GC_CLASS_DUMP records for classes (java.lang.String etc) in the heap dump event but in 1.5, records for common classes like java.lang.String are not provided. This makes a transparent move from 1.4 to 1.5 impossible especially when apps depends on records for all classes being present.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Request for a heap dump and go thru all the records of type JVMPI_GC_CLASS_DUMP. Print the class names and a lot of classes will not show up even though objects of that class are present in the heap dump.

      Attached is a zip file (myprofiler.zip) containing a sample profiler. This was built on windows and it requires STL include files. I have anyway, provided the dll file that can be used to test. I have also provided sample log files. If you look at the log file for jdk1.5, the class dump records are not provided for many classes (looks like it provides it for only user defined classes). However, the 1.4 log contains the class dump records for all classes which our profiler depends on.

      To run this example:

      1> copy myprofiler.dll to windows systems directory or set the PATH env
      variable to this library location.
      2> Execute any java program you want to profile
          java -Xrunmyprofiler:log=c:\temp\myprofiler.log -jar swingset2.jar
         The log variable should be set to whichever location you want a log file
      written to (including the file name).
      3> Once the java program ends, a heap dump is requested during the shutdown
      event and it prints out all the classes for which a class dump record is
      present in the heap dump. As each class is loaded by the jvm (i.e. class
      load event), the class name is written to the log file too (along with # of
      interfaces, # of static fields and # of static fields which are references).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Records for loaded classes should be present
      ACTUAL -
      Well known classes like java.lang.String, java.util.Hashtable etc. were missing

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Need to change the app for transition from 1.4 to 1.5.
      (Incident Review ID: 296539)
      ======================================================================

      Attachments

        Activity

          People

            dcubed Daniel Daugherty
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: