RFR: 8215771: The jfr tool should print pretty print reference chains

Erik Gahlin erik.gahlin at oracle.com
Thu Jan 3 13:41:29 UTC 2019


Hi,

Could I please have a review of change that will pretty print reference 
chains for the 'jfr' tool.

Enhancement:
https://bugs.openjdk.java.net/browse/JDK-8215771

Webrev:
http://cr.openjdk.java.net/~egahlin/8215771/

Testing:
test/jdk/jdk/jfr/*

Example:

$ jfr print --events OldObjectSample recording.jfr

jdk.OldObjectSample {
   startTime = 22:23:23.107
   duration = 29,017 ms
   allocationTime = 22:23:14.693
   lastKnownHeapUsage = 13,1 MB
   object =  [
     int[205542]
     data : sun.awt.image.IntegerInterleavedRaster
     raster : java.awt.image.BufferedImage
     bimg : java2d.Intro$Surface$SiE
     [0] : java.lang.Object[10]
     elementData : java.util.ArrayList Size: 1
     parts : java2d.Intro$Surface$Scene
     [16] : java.lang.Object[22]
     elementData : java2d.Intro$Surface$Director Size: 20
     director : java2d.Intro$Surface
   ]
   arrayElements = 205542
   root = {
     description = "Thread Name: Intro"
     system = "Threads"
     type = "Stack Variable"
   }
   eventThread = "AWT-EventQueue-0" (javaThreadId = 30)
}

Thanks
Erik





More information about the hotspot-jfr-dev mailing list