Currently, when the JVM crashes within the compiler, the replay data file (replay_pid%p.log) is invariably written to the current working directory. This behavior becomes problematic when a user configures -XX:ErrorFile to redirect the hs_err log to a specific location, such as /var/log/. In this scenario, the crash artifacts become fragmented: the error log goes to the custom path, while the replay file is left behind in the working directory, effectively separating the diagnostic files.
To resolve this, I propose introducing a -XX:ReplayFile=<path> flag that mirrors the functionality of -XX:ErrorFile. This option should support variable expansion (like %p for PID) and allow users to explicitly define the output path. This would enable administrators to co-locate the replay file with the error file, preventing artifact loss in environments with read-only working directories and ensuring consistent log management.
To resolve this, I propose introducing a -XX:ReplayFile=<path> flag that mirrors the functionality of -XX:ErrorFile. This option should support variable expansion (like %p for PID) and allow users to explicitly define the output path. This would enable administrators to co-locate the replay file with the error file, preventing artifact loss in environments with read-only working directories and ensuring consistent log management.