With the defaultrecording=true, we can not set filename, delay, maxAge, maxSize, duration and compress.
In the source code, https://java.se.oracle.com/source/xref/jdk8u-dev/jdk/src/closed/share/classes/oracle/jrockit/jfr/DCmdStart.java#188
195 if (filename != null || delay != 0 || maxAge != 0 || maxSize != 0 || duration != 0 || compress != false) {
196 throw new DCmdException("The only option that can be combined with defaultrecording is settings.");
197 }
Fro example the following command does not start the recording and shows the following exception:
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=compress=true,defaultrecording=true,dumponexit=true,filename=jfr.jfr Test
The only option that can be combined with defaultrecording is settings.
I think this is reasonable since defaultrecording=true starts a continuous recording.
This should be documented in the docs that with defaultrecording=true, we can not set filename, delay, maxAge, maxSize, duration and compress options.
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BABCBGHF
In the source code, https://java.se.oracle.com/source/xref/jdk8u-dev/jdk/src/closed/share/classes/oracle/jrockit/jfr/DCmdStart.java#188
195 if (filename != null || delay != 0 || maxAge != 0 || maxSize != 0 || duration != 0 || compress != false) {
196 throw new DCmdException("The only option that can be combined with defaultrecording is settings.");
197 }
Fro example the following command does not start the recording and shows the following exception:
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=compress=true,defaultrecording=true,dumponexit=true,filename=jfr.jfr Test
The only option that can be combined with defaultrecording is settings.
I think this is reasonable since defaultrecording=true starts a continuous recording.
This should be documented in the docs that with defaultrecording=true, we can not set filename, delay, maxAge, maxSize, duration and compress options.
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BABCBGHF