I'm testing my Java code with filghtrecorder, all other data sees good(they shows sth.), but the "Memory -> Object Statistics" is empty.
Using JDK 1.8.0_161
Here is the parameter I used.
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=dumponexit=true,filename=4.jfr,settings=default -jar myapp.jar
I tried change the settings to "settings=profile", but not help. (I don't know the different)
I'm wondering why it's not enable by default, or it's enabled but none of the object worth to record ?
As you might be able to see in the JMC UI, it's the 'Object Count' event that is needed for that page. Make your own settings version, for example by copying the JDK/jre/lib/jfr/profile.jfc file and changing enabled to true in this section.
<setting name="enabled" control="heap-statistics-enabled">false</setting>
<setting name="period">everyChunk</setting>
</event>
You can also use the JMC UI to create a new settings file, click on the Template Manager button in the Start Flight Recording wizard.
Either save the new file in JDK/jre/lib/jfr/ and then you can just use settings=mynewsettings
in the commandline, or save it somewhere else and use settings=<fullpathtomynewsettingsfile>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With