简体   繁体   中英

When I use Epsilon GC, I cannot use Flight Recorder

I'm running this command

java -cp "D:\Dev\Books Spaces\Java-11-and-12-New-Features-master\Chapter09" -XX:StartFlightRecording,filename=Epsilon.jfr -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC exploring_further/TestFlightRecorder

The code runs, however the .jfr file is 0 bytes.

When I remove -XX:+UseEpsilonGC and Java defaults to G1 GC. the code runs and the flight recorder dump all the data to file and I can read it.

Why when I use Epsilon the file is empty and how Can I fix it.

On JDK 14 Windows 10.

I could not reproduce on Oracle JDK 14.02 (Windows).

The file has zero size until the recording is dumped, which happens when the JVM exits (normally), so you need to wait for that.

If the application ends because an OutOfMemoryError, a recording can't be guaranteed, and if it happens, it is probably an emergency recording (which may lack information) and it is created with the prefix hs_oom_pid.

I fix it by hitting Ctrl+C while the code was running. the .jfr file gets populated and so I can read it. If I wait for OutOfMemoryError The file still 0 bytes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM