javajvmheap-dumphprof

Extract JVM uptime from binary heap dump


I am analyzing several heap dumps and am interested in a way that I can get the JVM uptime (or start time) from the heap dump. Using eclipse memory analyzer I can easy get the System Properties and class path but can't find a way to find uptime.


Solution

  • You can try to search for the sun.util.calendar.ZoneInfoFile class, it contains the long CURRT field. Its value matches with the JVM start time in VisualVM (in my case, at least, with the Oracle JVM):

    Screenshot from MAT

    Type|Name |Value
    ---------------------
    long|CURRT|1578570465
    ---------------------
    

    The epoch converter says it's 2020/1/9 6.47 am EST (GMT-5), the time I launched my Java application. Just in case, thehprof file was created few minutes later, at 7.03 am.