Skip to content

Commit

Permalink
Get the start time of the criu restore process
Browse files Browse the repository at this point in the history
Get the start time of the criu restore process, which is
the parent process of the restored java process.

Issue: eclipse-openj9#18598
Depends-on: eclipse-omr/omr#7214
Signed-off-by: Amarpreet Singh <[email protected]>
  • Loading branch information
singh264 committed Jan 24, 2024
1 parent 0318ff9 commit b8c17e8
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public final class InternalCRIUSupport {
private static native boolean enableCRIUSecProviderImpl();
private static native long getCheckpointRestoreNanoTimeDeltaImpl();
private static native long getLastRestoreTimeImpl();
private static native long getProcessRestoreStartTimeImpl();
private static native boolean isCRIUSupportEnabledImpl();
private static native boolean isCheckpointAllowedImpl();
/*[IF CRAC_SUPPORT]*/
Expand All @@ -95,13 +96,24 @@ public static long getCheckpointRestoreNanoTimeDelta() {
* Retrieve the time when the last restore occurred. In the case of multiple
* restores the previous times are overwritten.
*
* @return the time in milliseconds since the start of the epoch, -1 if restore
* @return the time in nanoseconds since the start of the epoch, -1 if restore
* has not occurred.
*/
public static long getLastRestoreTime() {
return getLastRestoreTimeImpl();
}

/**
* Get the start time of the CRIU process that restores the java process.
* The time that is set by the restored java process when it resumes from
* checkpoint can be retrieved with {@link #getLastRestoreTime()}.
*
* @return the time in nanoseconds since the epoch, -1 if restore has not occurred.
*/
public static long getProcessRestoreStartTime() {
return getProcessRestoreStartTimeImpl();
}

/**
* Queries if CRaC or CRIU support is enabled.
*
Expand Down
10 changes: 9 additions & 1 deletion runtime/jcl/common/criu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ Java_openj9_internal_criu_InternalCRIUSupport_getLastRestoreTimeImpl(JNIEnv *env
{
J9VMThread *currentThread = (J9VMThread *)env;

return currentThread->javaVM->checkpointState.lastRestoreTimeMillis;
return currentThread->javaVM->checkpointState.lastRestoreTimeInNanoseconds;
}

jlong JNICALL
Java_openj9_internal_criu_InternalCRIUSupport_getProcessRestoreStartTimeImpl(JNIEnv *env, jclass unused)
{
J9VMThread *currentThread = (J9VMThread *)env;

return currentThread->javaVM->checkpointState.processRestoreStartTimeInNanoseconds;
}

jboolean JNICALL
Expand Down
1 change: 1 addition & 0 deletions runtime/jcl/exports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ if(J9VM_OPT_CRIU_SUPPORT)
Java_openj9_internal_criu_InternalCRIUSupport_enableCRIUSecProviderImpl
Java_openj9_internal_criu_InternalCRIUSupport_getCheckpointRestoreNanoTimeDeltaImpl
Java_openj9_internal_criu_InternalCRIUSupport_getLastRestoreTimeImpl
Java_openj9_internal_criu_InternalCRIUSupport_getProcessRestoreStartTimeImpl
Java_openj9_internal_criu_InternalCRIUSupport_getRestoreSystemProperites
Java_openj9_internal_criu_InternalCRIUSupport_isCheckpointAllowedImpl
Java_openj9_internal_criu_InternalCRIUSupport_isCRIUSupportEnabledImpl
Expand Down
1 change: 1 addition & 0 deletions runtime/jcl/uma/criu_exports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<export name="Java_openj9_internal_criu_InternalCRIUSupport_enableCRIUSecProviderImpl" />
<export name="Java_openj9_internal_criu_InternalCRIUSupport_getCheckpointRestoreNanoTimeDeltaImpl" />
<export name="Java_openj9_internal_criu_InternalCRIUSupport_getLastRestoreTimeImpl" />
<export name="Java_openj9_internal_criu_InternalCRIUSupport_getProcessRestoreStartTimeImpl" />
<export name="Java_openj9_internal_criu_InternalCRIUSupport_isCheckpointAllowedImpl" />
<export name="Java_openj9_internal_criu_InternalCRIUSupport_isCRIUSupportEnabledImpl" />
</exports>
7 changes: 7 additions & 0 deletions runtime/nls/j9vm/j9vm.nls
Original file line number Diff line number Diff line change
Expand Up @@ -2313,3 +2313,10 @@ J9NLS_VM_CRIU_CRAC_INCOMPATIBLE_SETTING.explanation=-XX:+EnableCRIUSupport and -
J9NLS_VM_CRIU_CRAC_INCOMPATIBLE_SETTING.system_action=The JVM will fail to start.
J9NLS_VM_CRIU_CRAC_INCOMPATIBLE_SETTING.user_response=Remove one of the options from the command line.
# END NON-TRANSLATABLE

J9NLS_VM_CRIU_J9_GET_PROCESS_START_TIME_FAILURE=j9sysinfo_get_process_start_time failed with errno=%zi
# START NON-TRANSLATABLE
J9NLS_VM_CRIU_J9_GET_PROCESS_START_TIME_FAILURE.explanation=j9sysinfo_get_process_start_time failed.
J9NLS_VM_CRIU_J9_GET_PROCESS_START_TIME_FAILURE.system_action=The JVM will throw a JVMRestoreException.
J9NLS_VM_CRIU_J9_GET_PROCESS_START_TIME_FAILURE.user_response=View CRIU documentation to determine how to resolve the error.
# END NON-TRANSLATABLE
3 changes: 2 additions & 1 deletion runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4228,7 +4228,8 @@ typedef struct J9CRIUCheckpointState {
* Only supports one Checkpoint, could be restored multiple times.
*/
I_64 checkpointRestoreTimeDelta;
I_64 lastRestoreTimeMillis;
I_64 lastRestoreTimeInNanoseconds;
I_64 processRestoreStartTimeInNanoseconds;
UDATA maxRetryForNotCheckpointSafe;
UDATA sleepMillisecondsForNotCheckpointSafe;
jclass criuJVMCheckpointExceptionClass;
Expand Down
3 changes: 3 additions & 0 deletions runtime/oti/j9port_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,9 @@ extern J9_CFUNC int32_t j9port_isCompatible(struct J9PortLibraryVersion *expecte
#define j9sysinfo_get_open_file_count(param1) OMRPORT_FROM_J9PORT(privatePortLibrary)->sysinfo_get_open_file_count(OMRPORT_FROM_J9PORT(privatePortLibrary),param1)
#define j9sysinfo_get_os_description(param1) OMRPORT_FROM_J9PORT(privatePortLibrary)->sysinfo_get_os_description(OMRPORT_FROM_J9PORT(privatePortLibrary),param1)
#define j9sysinfo_os_has_feature(param1,param2) OMRPORT_FROM_J9PORT(privatePortLibrary)->sysinfo_os_has_feature(OMRPORT_FROM_J9PORT(privatePortLibrary),param1,param2)
#if defined(J9VM_OPT_CRIU_SUPPORT)
#define j9sysinfo_get_process_start_time(param1,param2) OMRPORT_FROM_J9PORT(privatePortLibrary)->sysinfo_get_process_start_time(OMRPORT_FROM_J9PORT(privatePortLibrary),param1,param2)
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
#define j9syslog_write(param1,param2) OMRPORT_FROM_J9PORT(privatePortLibrary)->syslog_write(OMRPORT_FROM_J9PORT(privatePortLibrary),param1,param2)
#define j9hypervisor_startup() privatePortLibrary->hypervisor_startup(privatePortLibrary)
#define j9hypervisor_shutdown() privatePortLibrary->hypervisor_shutdown(privatePortLibrary)
Expand Down
3 changes: 3 additions & 0 deletions runtime/oti/jclprots.h
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@ Java_openj9_internal_criu_InternalCRIUSupport_getCheckpointRestoreNanoTimeDeltaI
jlong JNICALL
Java_openj9_internal_criu_InternalCRIUSupport_getLastRestoreTimeImpl(JNIEnv *env, jclass unused);

jlong JNICALL
Java_openj9_internal_criu_InternalCRIUSupport_getProcessRestoreStartTimeImpl(JNIEnv *env, jclass unused);

jboolean JNICALL
Java_openj9_internal_criu_InternalCRIUSupport_isCheckpointAllowedImpl(JNIEnv *env, jclass unused);

Expand Down
24 changes: 24 additions & 0 deletions runtime/tests/port/si.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,27 @@ j9sysinfo_test_get_l1dcache_line_size(struct J9PortLibrary *portLibrary)
return reportTestExit(portLibrary, testName);
}

#if defined(J9VM_OPT_CRIU_SUPPORT)
I_32
j9sysinfo_test_get_process_start_time(struct J9PortLibrary *portLibrary)
{
PORT_ACCESS_FROM_PORT(portLibrary);
const char *testName = "j9sysinfo_test_get_process_start_time";
UDATA pid = j9sysinfo_get_pid();
U_64 processStartTimeInNanoseconds = 0;
I_32 rc = j9sysinfo_get_process_start_time(pid, &processStartTimeInNanoseconds);
if ((0 != rc) || (0 == processStartTimeInNanoseconds)) {
outputErrorMessage(
PORTTEST_ERROR_ARGS,
"j9sysinfo_get_process_start_time, pid=%zu, processStartTimeInNanoseconds=%llu, rc=%d.\n",
pid,
processStartTimeInNanoseconds,
rc);
}
return reportTestExit(portLibrary, testName);
}
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/*
* pass in the port library to do sysinfo tests
*/
Expand Down Expand Up @@ -2350,6 +2371,9 @@ j9sysinfo_runTests(struct J9PortLibrary *portLibrary, char *argv0)
/* Not supported on Z & OSX (and Windows, of course). Enable, when available. */
rc |= j9sysinfo_test_get_open_file_count(portLibrary);
#endif /* defined(LINUX) || defined(AIXPPC) */
#if defined(J9VM_OPT_CRIU_SUPPORT)
rc |= j9sysinfo_test_get_process_start_time(portLibrary);
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/* Output results */
j9tty_printf(PORTLIB, "\nSysinfo test done%s\n\n", rc == TEST_PASS ? "." : ", failures detected.");
Expand Down
29 changes: 26 additions & 3 deletions runtime/vm/CRIUHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ static BOOLEAN criuRestoreDisableSharedClassCache(J9VMThread *currentThread, voi
static BOOLEAN criuRestoreInitializeDump(J9VMThread *currentThread, void *userData, const char **nlsMsgFormat);
static jvmtiIterationControl objectIteratorCallback(J9JavaVM *vm, J9MM_IterateObjectDescriptor *objectDesc, void *userData);

#define J9TIME_NANOSECONDS_PER_MILLIS 1000000
#define STRING_BUFFER_SIZE 256
#define ENV_FILE_BUFFER 1024

Expand Down Expand Up @@ -1510,6 +1509,7 @@ criuCheckpointJVMImpl(JNIEnv *env,
I_32 syslogBufferSize = 0;
UDATA oldVMState = VM_VMHelpers::setVMState(currentThread, J9VMSTATE_CRIU_SUPPORT_CHECKPOINT_PHASE_START);
UDATA notSafeToCheckpoint = 0;
UDATA criuRestorePid = 0;

vmFuncs->internalEnterVMFromJNI(currentThread);

Expand Down Expand Up @@ -1756,8 +1756,31 @@ criuCheckpointJVMImpl(JNIEnv *env,
VM_VMHelpers::setVMState(currentThread, J9VMSTATE_CRIU_SUPPORT_RESTORE_PHASE_START);
restoreNanoTimeMonotonic = j9time_nano_time();
restoreNanoUTCTime = j9time_current_time_nanos(&success);
vm->checkpointState.lastRestoreTimeMillis = (I_64)(restoreNanoUTCTime / J9TIME_NANOSECONDS_PER_MILLIS);
Trc_VM_criu_after_dump(currentThread, restoreNanoTimeMonotonic, restoreNanoUTCTime, vm->checkpointState.lastRestoreTimeMillis);
if (0 == success) {
systemReturnCode = errno;
currentExceptionClass = vm->checkpointState.criuSystemRestoreExceptionClass;
nlsMsgFormat = j9nls_lookup_message(
J9NLS_DO_NOT_PRINT_MESSAGE_TAG | J9NLS_DO_NOT_APPEND_NEWLINE,
J9NLS_VM_CRIU_J9_CURRENT_TIME_NANOS_FAILURE,
NULL);
j9mem_free_memory(syslogOptions);
goto wakeJavaThreadsWithExclusiveVMAccess;
}
vm->checkpointState.lastRestoreTimeInNanoseconds = (I_64)restoreNanoUTCTime;
Trc_VM_criu_after_dump(currentThread, restoreNanoTimeMonotonic, vm->checkpointState.lastRestoreTimeInNanoseconds);
criuRestorePid = j9sysinfo_get_ppid();
systemReturnCode = j9sysinfo_get_process_start_time(criuRestorePid, &restoreNanoUTCTime);
if (0 != systemReturnCode) {
currentExceptionClass = vm->checkpointState.criuSystemRestoreExceptionClass;
nlsMsgFormat = j9nls_lookup_message(
J9NLS_DO_NOT_PRINT_MESSAGE_TAG | J9NLS_DO_NOT_APPEND_NEWLINE,
J9NLS_VM_CRIU_J9_GET_PROCESS_START_TIME_FAILURE,
NULL);
j9mem_free_memory(syslogOptions);
goto wakeJavaThreadsWithExclusiveVMAccess;
}
vm->checkpointState.processRestoreStartTimeInNanoseconds = (I_64)restoreNanoUTCTime;
Trc_VM_criu_process_restore_start_after_dump(currentThread, criuRestorePid, vm->checkpointState.processRestoreStartTimeInNanoseconds);
if (!syslogFlagNone) {
/* Re-open the system logger, and set options with saved string value. */
j9port_control(J9PORT_CTLDATA_SYSLOG_OPEN, 0);
Expand Down
4 changes: 3 additions & 1 deletion runtime/vm/j9vm.tdf
Original file line number Diff line number Diff line change
Expand Up @@ -960,5 +960,7 @@ TraceException=Trc_VM_criu_setupJNIFieldIDsAndCRIUAPI_null_exception_class Overh
TraceException=Trc_VM_criu_setupJNIFieldIDsAndCRIUAPI_null_init Overhead=1 Level=1 Template="setupJNIFieldIDsAndCRIUAPI() criuSystemRestoreExceptionInit(%p) criuJVMRestoreExceptionInit(%p) criuSystemCheckpointExceptionInit(%p) criuJVMCheckpointExceptionInit(%p)"

TraceExit=Trc_VM_criu_checkpointJVMImpl_Exit Overhead=1 Level=2 Template="Java_openj9_internal_criu_CRIUSupport_checkpointJVMImpl"
TraceEvent=Trc_VM_criu_after_dump Overhead=1 Level=2 Template="After checkpoint criu_dump(), criuRestoreNanoTimeMonotonic (%lld), criuRestoreNanoUTCTime (%llu), lastRestoreTimeMillis (%lld)"
TraceEvent=Trc_VM_criu_after_dump Obsolete Overhead=1 Level=2 Template="After checkpoint criu_dump(), criuRestoreNanoTimeMonotonic (%lld), criuRestoreNanoUTCTime (%llu), lastRestoreTimeMillis (%lld)"
TraceEvent=Trc_VM_crac_checkpointTo NoEnv Overhead=1 Level=3 Template="-XX:CRaCCheckpointTo=%s"
TraceEvent=Trc_VM_criu_after_dump Overhead=1 Level=2 Template="After checkpoint criu_dump(), restoreNanoTimeMonotonic (%lld), lastRestoreTimeInNanoseconds (%lld)"
TraceEvent=Trc_VM_criu_process_restore_start_after_dump Overhead=1 Level=2 Template="After checkpoint criu_dump(), restorePid (%zu), processRestoreStartTimeInNanoseconds (%lld)"
3 changes: 2 additions & 1 deletion runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3978,7 +3978,8 @@ processVMArgsFromFirstToLast(J9JavaVM * vm)
}
}

vm->checkpointState.lastRestoreTimeMillis = -1;
vm->checkpointState.lastRestoreTimeInNanoseconds = -1;
vm->checkpointState.processRestoreStartTimeInNanoseconds = -1;
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
*******************************************************************************/
package org.openj9.test.util;

import java.time.Instant;
import java.util.ArrayList;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;

/**
* Utility class to check time.
Expand Down Expand Up @@ -91,6 +93,11 @@ public static boolean checkElapseTime(String testName, long startMillisTime, lon
return checkElapseTime(testName, startMillisTime, startNanoTime, minElapsedMillisTime, 0, minElapsedNanoTimeInMillis, 0);
}

public static long getCurrentTimeInNanoseconds() {
Instant instant = Instant.now();
return TimeUnit.SECONDS.toNanos(instant.getEpochSecond()) + instant.getNano();
}

private volatile boolean tasksPassed = true;
private volatile int taskRunning = 0;
private volatile int taskStarted = 0;
Expand Down
18 changes: 17 additions & 1 deletion test/functional/cmdLineTests/criu/criu_nonPortable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
</test>

<test id="Create CRIU checkpoint image and restore once - testGetLastRestoreTime">
<command>bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$ -Xtrace:print={j9vm.684-696,j9vm.699,j9vm.717-743} --add-exports java.base/openj9.internal.criu=ALL-UNNAMED" $MAINCLASS_TIMECHANGE$ testGetLastRestoreTime 1 false false</command>
<command>bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$ -Xtrace:print={j9vm.684-696,j9vm.699,j9vm.717-743,j9vm.746-747} --add-exports java.base/openj9.internal.criu=ALL-UNNAMED" $MAINCLASS_TIMECHANGE$ testGetLastRestoreTime 1 false false</command>
<output type="success" caseSensitive="no" regex="no">Killed</output>
<output type="success" caseSensitive="yes" regex="no">PASSED: InternalCRIUSupport.getLastRestoreTime()</output>
<output type="failure" caseSensitive="yes" regex="no">CRIU is not enabled</output>
Expand All @@ -205,6 +205,22 @@
<output type="failure" caseSensitive="yes" regex="no">User requested Java dump using</output>
</test>

<test id="Create CRIU checkpoint image and restore once - testGetProcessRestoreStartTime">
<command>bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$ -Xtrace:print={j9vm.684-696,j9vm.699,j9vm.717-743,j9vm.746-747} --add-exports java.base/openj9.internal.criu=ALL-UNNAMED" $MAINCLASS_TIMECHANGE$ testGetProcessRestoreStartTime 1 false false</command>
<output type="success" caseSensitive="no" regex="no">Killed</output>
<output type="success" caseSensitive="yes" regex="no">PASSED: InternalCRIUSupport.getProcessRestoreStartTime()</output>
<output type="failure" caseSensitive="yes" regex="no">CRIU is not enabled</output>
<output type="failure" caseSensitive="yes" regex="no">Operation not permitted</output>
<output type="failure" caseSensitive="yes" regex="no">FAILED: InternalCRIUSupport.getProcessRestoreStartTime()</output>
<!-- If CRIU can't acquire the original thread IDs, this test will fail. Nothing can be done about this failure. -->
<output type="success" caseSensitive="yes" regex="no">Thread pid mismatch</output>
<output type="success" caseSensitive="yes" regex="no">do not match expected</output>
<output type="success" caseSensitive="yes" regex="no">Unable to create a thread:</output>
<!-- In the past, the failure below was caused by an issue where CRIU can't be found on the PATH. -->
<output type="failure" caseSensitive="yes" regex="no">Could not dump the JVM processes, err=-70</output>
<output type="failure" caseSensitive="yes" regex="no">User requested Java dump using</output>
</test>

<test id="Create CRIU checkpoint image and restore once - testMXBeanUpTime">
<command>bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$ -Xtrace:print={j9jcl.533,j9vm.684-696,j9vm.699,j9vm.717-743} --add-exports java.base/openj9.internal.criu=ALL-UNNAMED" -Xdump:java+system+jit:events=throw+systhrow,filter=org/eclipse/openj9/criu/JVMCheckpointException $MAINCLASS_TIMECHANGE$ testMXBeanUpTime 1 false false</command>
<output type="success" caseSensitive="no" regex="no">Killed</output>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static void main(String args[]) throws InterruptedException {
case "testGetLastRestoreTime":
tct.testGetLastRestoreTime();
break;
case "testGetProcessRestoreStartTime":
tct.testGetProcessRestoreStartTime();
break;
case "testMXBeanUpTime":
tct.testMXBeanUpTime();
break;
Expand Down Expand Up @@ -228,10 +231,10 @@ private void testGetLastRestoreTime() {
+ " should be -1 before restore");
}
CRIUSupport criu = CRIUTestUtils.prepareCheckPointJVM(CRIUTestUtils.imagePath);
long beforeCheckpoint = System.currentTimeMillis();
long beforeCheckpoint = TimeUtilities.getCurrentTimeInNanoseconds();
CRIUTestUtils.checkPointJVMNoSetup(criu, CRIUTestUtils.imagePath, false);
lastRestoreTime = InternalCRIUSupport.getLastRestoreTime();
long afterRestore = System.currentTimeMillis();
long afterRestore = TimeUtilities.getCurrentTimeInNanoseconds();
if (beforeCheckpoint >= lastRestoreTime) {
System.out.println("FAILED: InternalCRIUSupport.getLastRestoreTime() - " + lastRestoreTime
+ " can't be less than the beforeCheckpoint time - " + beforeCheckpoint);
Expand All @@ -245,6 +248,33 @@ private void testGetLastRestoreTime() {
}
}

private void testGetProcessRestoreStartTime() {
long processRestoreStartTime = InternalCRIUSupport.getProcessRestoreStartTime();
if (processRestoreStartTime != -1) {
System.out.println("FAILED: InternalCRIUSupport.getProcessRestoreStartTime() - " + processRestoreStartTime
+ " is not -1 before restore");
}
CRIUSupport criu = CRIUTestUtils.prepareCheckPointJVM(CRIUTestUtils.imagePath);
long beforeCheckpointTime = TimeUtilities.getCurrentTimeInNanoseconds();
CRIUTestUtils.checkPointJVMNoSetup(criu, CRIUTestUtils.imagePath, false);
processRestoreStartTime = InternalCRIUSupport.getProcessRestoreStartTime();
long lastRestoreTime = InternalCRIUSupport.getLastRestoreTime();
long afterRestoreTime = TimeUtilities.getCurrentTimeInNanoseconds();
if (beforeCheckpointTime >= processRestoreStartTime) {
System.out.println("FAILED: InternalCRIUSupport.getProcessRestoreStartTime() - " + processRestoreStartTime
+ " is less than beforeCheckpointTime - " + beforeCheckpointTime);
} else if (processRestoreStartTime >= lastRestoreTime) {
System.out.println("FAILED: InternalCRIUSupport.getProcessRestoreStartTime() - " + processRestoreStartTime
+ " is more than InternalCRIUSupport.getLastRestoreTime() - " + lastRestoreTime);
} else if (processRestoreStartTime >= afterRestoreTime) {
System.out.println("FAILED: InternalCRIUSupport.getProcessRestoreStartTime() - " + processRestoreStartTime
+ " is more than afterRestoreTime - " + afterRestoreTime);
} else {
System.out.println("PASSED: InternalCRIUSupport.getProcessRestoreStartTime() - " + processRestoreStartTime
+ " is between beforeCheckpointTime - " + beforeCheckpointTime + " and afterRestoreTime - " + afterRestoreTime);
}
}

private void testMXBeanUpTime() {
CRIUSupport criu = CRIUTestUtils.prepareCheckPointJVM(CRIUTestUtils.imagePath);
RuntimeMXBean mxb = ManagementFactory.getRuntimeMXBean();
Expand Down

0 comments on commit b8c17e8

Please sign in to comment.