[crac] RFR: Reset JVM start time and up time on restore (CRaCResetStartTime)
Roman Marchenko
rmarchenko at openjdk.org
Wed Oct 18 08:28:18 UTC 2023
On Tue, 17 Oct 2023 11:46:55 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
>> This change adds an opportunity reset both JVM's start time and uptime on restoring.
>>
>> Resetting time may be performed with the new flag "-XX:+CRaCResetStartTime".
>>
>> The flag is 'false' by default.
>
> src/hotspot/os/linux/crac_linux.cpp line 468:
>
>> 466:
>> 467: void crac::initialize_time_counters() {
>> 468: os::Posix::init();
>
> The initialization updates some condition variable attributes; have you checked if there's any chance that another thread could observe an inconsistent state while this is updated?
You're right, I missed it.
> test/jdk/jdk/crac/ResetStartTimeTest.java line 44:
>
>> 42: * @run driver/timeout=60 jdk.test.lib.crac.CracTest true
>> 43: */
>> 44: public class SimpleTest implements CracTest {
>
> Could you please name the test `ResetStartTimeTest` to match the filename?
Ye olde copy-n-paste :)
Thanks!
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1363461639
PR Review Comment: https://git.openjdk.org/crac/pull/130#discussion_r1363417336
More information about the crac-dev
mailing list