[crac] RFR: 8328344: [CRaC] Avoid error when running with -XX:+PerfDisableSharedMem

Volker Simonis simonis at openjdk.org
Tue Mar 19 10:02:06 UTC 2024

On Mon, 18 Mar 2024 10:37:04 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> CRaC tries to unconditionally restore the hsperf file, even if the checkpointed JVM process was started with `-XX:+PerfDisableSharedMem`.
> The fix is trivial: check for the existence of the hsperf file in `PerfMemoryLinux::restore()` just as we already do it in `PerfMemoryLinux::checkpoint()`.

I've now added a test for `-XX:+/-PerfDisableSharedMem`, i.e. I've extended `PerfMemoryRestoreTest` to run with both, `-XX:-PerfDisableSharedMem` and `-XX:+PerfDisableSharedMem`.


PR Comment: https://git.openjdk.org/crac/pull/153#issuecomment-2006601529

More information about the crac-dev mailing list