[crac] RFR: 8328344: [CRaC] Avoid error when running with -XX:+PerfDisableSharedMem [v4]
Anton Kozlov
akozlov at openjdk.org
Fri Mar 22 16:47:35 UTC 2024
On Fri, 22 Mar 2024 13:59:54 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()`.
>
> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>
> Don't wait 2x10 seconds when with -XX:+PerfDisableSharedMem
test/jdk/jdk/crac/PerfMemoryRestoreTest.java line 68:
> 66: Path perfdata = Path.of("/tmp", "hsperfdata_" + System.getProperty("user.name"), pid);
> 67: if (perfDisableSharedMem) {
> 68: Thread.sleep(100);
I like the refactoring and that we can control this delay independently.
Nit-picking: should not be this a named constant? And does 100ms has any reason behind, or can it be 1sec (a little bit safer)?
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/153#discussion_r1535880319
More information about the crac-dev
mailing list