I'm running JFR on JDK 1.8_261.
I'm running my application using those VM options:
-XX:+UseG1GC -XX:+UnlockCommercialFeatures -XX:+FlightRecorder
-XX:FlightRecorderOptions=maxage=5h,defaultrecording=true,loglevel=info,dumponexit=true,
settings=/usr/java/jdk1.8.0_261-amd64/jre/lib/jfr/profile.jfc,dumponexitpath=/tmp/a.jfr
This is the profile.jfc
file I'm using: https://gist.github.com/oripwk/e7d598f90e567a658cd767b16379f281
However, I cannot see Live Objects when opening the file with JDK Mission Control as you see in the screenshot.
What do I need to do to enable Live Objects?
The event for the Live objects (vm/gc/detailed/object_count) is disabled by default due to the overhead, a full sweep of the heap. You can fix this by go to Window -> Template Manager in JMC and check "Heap Statistics" and export the settings file.
Or you can edit the .jfc file manually and set vm/gc/detailed/object_count enabled to true.