This happened in 11-b14.
1. I created the AppCDS archive with -XX:StartFlightRecording=dumponexit=true
2. Archive created successfully AFAICT
3. Went to run my app with
-XX:+UnlockCommercialFeatures -XX:StartFlightRecording=dumponexit=true -Xshare:on -XX:+UnlockCommercialFeatures -XX:SharedArchiveFile=App.jsa -XX:+UseAppCDS
And this happened:
Error occurred during initialization of VM
Failure when starting JFR on_vm_start
- The app would start ok with -XX:+UnlockCommercialFeatures -XX:StartFlightRecording=dumponexit=true -Xshare:off -XX:+UnlockCommercialFeatures -XX:SharedArchiveFile=App.jsa -XX:+UseAppCDS
- We re-created the archive without -XX:StartFlightRecording=dumponexit=true and then the app booted correctly with all of it: -XX:+UnlockCommercialFeatures -XX:StartFlightRecording=dumponexit=true -Xshare:on -XX:+UnlockCommercialFeatures -XX:SharedArchiveFile=App.jsa -XX:+UseAppCDS