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

Radim Vansa rvansa at openjdk.org
Mon Jun 19 14:09:51 UTC 2023


On Thu, 23 Mar 2023 15:38:35 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: a8e69ded
Author:    Radim Vansa <rvansa at openjdk.org>
URL:       https://git.openjdk.org/crac/commit/a8e69dede4654f76916db19ac008f20902d752aa
Stats:     312 lines in 7 files changed: 285 ins; 0 del; 27 mod

Correct System.nanotime() value after restore

Reviewed-by: akozlov

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

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


More information about the crac-dev mailing list