2 Replies Latest reply on Nov 6, 2018 1:57 PM by Hirt-Oracle

    How to extract a flight recording (.jfr) from a heap dump (.hprof)

    user1149220

      Hi Java Flight Recorder team,

       

      is it possible to extract a recording (.jfr file) from a heap dump (.hprof)?

       

      This would be terrific.

       

      Best regards & keep up the great work.

       

      Josef

        • 1. Re: How to extract a flight recording (.jfr) from a heap dump (.hprof)
          Hirt-Oracle

          No. A hprof dump is a separate binary format representing the full contents of the Java heap. You can use JMC to perform heap dumps. Though be careful with heap dumps - a heap dump contains all the information on the heap, and due care must be taken with them if produced from a production system. A wayward heap dump containing all of the information about your customers and their businesses is enough to destroy YOUR business...

           

          JFR contains a representation of what the JVM and the application running on the JVM were up to, but they do not contain a full representation of all the objects on the heap. If they would the recordings would be significantly larger, and the overhead of producing them would be much larger as well.

          • 2. Re: How to extract a flight recording (.jfr) from a heap dump (.hprof)
            Hirt-Oracle

            I see now that your question is the other way around, and that is not possible either. Most of the JFR events are recorded into thread local native buffers. When those are full, they are copied to a ring of native buffers. That said, at Oracle support, they can extract recording information from a crash dump (not hprof though).