[crac] RFR: Correct System.nanotime() value after restore [v9]

Radim Vansa duke at openjdk.org
Tue May 16 09:29:13 UTC 2023


> There are various places both inside JDK and in libraries that rely on monotonicity of `System.nanotime()`. When the process is restored on a different machine the value will likely differ as the implementation provides time since machine boot. This PR records wall clock time before checkpoint and after restore and tries to adjust the value provided by nanotime() to reasonably correct value.

Radim Vansa has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 22 commits:

 - Merge branch 'crac' into nanotime
 - More checks when reading boot ID
 - Merge branch 'crac' into nanotime
 - Do not use negative monotonic offset
 - Merge branch 'crac' into nanotime
 - Fix whitespaces
 - Use image under ghcr.io/crac
 - Ensure monotonicity for the same boot
 - Set nanotime only if bootid changes
 - Reset nanotime offset before calculating it again
 - ... and 12 more: https://git.openjdk.org/crac/compare/4d9c616f...0b45adeb

-------------

Changes: https://git.openjdk.org/crac/pull/53/files
 Webrev: https://webrevs.openjdk.org/?repo=crac&pr=53&range=08
  Stats: 312 lines in 7 files changed: 285 ins; 0 del; 27 mod
  Patch: https://git.openjdk.org/crac/pull/53.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/53/head:pull/53

PR: https://git.openjdk.org/crac/pull/53


More information about the crac-dev mailing list