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

jhat: give a meaningful error message when presented with an ASCII format heap dump

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 6
    • core-svc
    • None
    • generic
    • generic

      jhat requires heap dumps in binary format. This is documented in the
      troubleshooting guide and on the man page.

      If a user tries to run jhat on an ASCII format file, they will see:

      % jhat java.hprof.txt
      Reading from java.hprof.txt...
      java.io.IOException: Version string not recognized at byte 18
              at com.sun.tools.hat.internal.parser.HprofReader.readVersionHeader(HprofReader.java:369)
              at com.sun.tools.hat.internal.parser.HprofReader.read(HprofReader.java:161)
              at com.sun.tools.hat.internal.parser.Reader.readFile(Reader.java:79)
              at com.sun.tools.hat.Main.main(Main.java:143)


      jhat should print a user-understandable message. Maybe something like:
        This is an ASCII format JAVA PROFILE 1.0.1 file. jhat requires binary
        format heap dump files.

            Unassigned Unassigned
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: