Skip to content

Commit

Permalink
Merge pull request #18531 from JasonFengJ9/timeelapse-0.43
Browse files Browse the repository at this point in the history
(v0.43.0-release) elapsed time tests
  • Loading branch information
pshipton committed Nov 28, 2023
2 parents 9d3cf2b + bbed315 commit e1b7e37
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 152 deletions.
2 changes: 1 addition & 1 deletion runtime/criusupport/criusupport.cpp
Expand Up @@ -656,13 +656,13 @@ Java_org_eclipse_openj9_criu_CRIUSupport_checkpointJVMImpl(JNIEnv *env,
bool setupCRIU = true;
PORT_ACCESS_FROM_VMC(currentThread);

Trc_CRIU_checkpointJVMImpl_Entry(currentThread);
if (NULL == vm->checkpointState.criuJVMCheckpointExceptionClass) {
setupCRIU = setupJNIFieldIDsAndCRIUAPI(env, &currentExceptionClass, &systemReturnCode, &nlsMsgFormat);
}

vm->checkpointState.checkpointThread = currentThread;

Trc_CRIU_checkpointJVMImpl_Entry(currentThread);
if (vmFuncs->isCheckpointAllowed(currentThread) && setupCRIU) {
#if defined(LINUX)
j9object_t cpDir = NULL;
Expand Down
78 changes: 78 additions & 0 deletions test/functional/cmdLineTests/criu/playlist.xml
Expand Up @@ -65,6 +65,12 @@
<variation>-Xint -XX:+CRIURestoreNonPortableMode</variation>
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
Expand Down Expand Up @@ -99,6 +105,12 @@
<variation>-Xgcpolicy:gencon -Xgcthreads64 -XX:CheckpointGCThreads=1</variation>
<variation>-Xgcpolicy:gencon -Xgcthreads1</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)exclude={org/openj9/criu/TimeChangeTest.nanoTimeInt()J},dontInline={org/openj9/criu/TimeChangeTest.nanoTimeInt()J|org/openj9/criu/TimeChangeTest.nanoTimeJit()J},{org/openj9/criu/TimeChangeTest.nanoTimeJit()J}(count=1)$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -128,6 +140,12 @@
<variation>-Xjit:count=0</variation>
<variation>-Xjit:vlog=vlog</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)disableSuffixLogs$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -156,6 +174,12 @@
<variations>
<variation>NoOptions</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
if [ -x $(Q)$(TEST_JDK_BIN)$(D)jitserver$(Q) ]; \
then \
Expand Down Expand Up @@ -195,6 +219,12 @@
<variation>-Xjit:vlog=vlog</variation>
<variation>-XX:+JVMPortableRestoreMode</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
if [ -x $(Q)$(TEST_JDK_BIN)$(D)jitserver$(Q) ]; \
then \
Expand Down Expand Up @@ -234,6 +264,12 @@
<variation>-Xgcpolicy:optthruput</variation>
<variation>-Xgcpolicy:optavgpause</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)exclude={org/openj9/criu/TimeChangeTest.nanoTimeInt()J},dontInline={org/openj9/criu/TimeChangeTest.nanoTimeInt()J|org/openj9/criu/TimeChangeTest.nanoTimeJit()J},{org/openj9/criu/TimeChangeTest.nanoTimeJit()J}(count=1)$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -265,6 +301,12 @@
<variation>-Xgcpolicy:optthruput</variation>
<variation>-Xgcpolicy:optavgpause</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)exclude={org/openj9/criu/TimeChangeTest.nanoTimeInt()J},dontInline={org/openj9/criu/TimeChangeTest.nanoTimeInt()J|org/openj9/criu/TimeChangeTest.nanoTimeJit()J},{org/openj9/criu/TimeChangeTest.nanoTimeJit()J}(count=1)$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -296,6 +338,12 @@
<variation>-Xgcpolicy:optthruput</variation>
<variation>-Xgcpolicy:optavgpause</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)exclude={org/openj9/criu/TimeChangeTest.nanoTimeInt()J},dontInline={org/openj9/criu/TimeChangeTest.nanoTimeInt()J|org/openj9/criu/TimeChangeTest.nanoTimeJit()J},{org/openj9/criu/TimeChangeTest.nanoTimeJit()J}(count=1)$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -327,6 +375,12 @@
<variation>-Xgcpolicy:optthruput</variation>
<variation>-Xgcpolicy:optavgpause</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
TR_Options=$(Q)exclude={org/openj9/criu/TimeChangeTest.nanoTimeInt()J},dontInline={org/openj9/criu/TimeChangeTest.nanoTimeInt()J|org/openj9/criu/TimeChangeTest.nanoTimeJit()J},{org/openj9/criu/TimeChangeTest.nanoTimeJit()J}(count=1)$(Q) \
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
Expand Down Expand Up @@ -357,6 +411,12 @@
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
<variation>-XX:+JVMPortableRestoreMode</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
Expand Down Expand Up @@ -388,6 +448,12 @@
<variation>-Xint -XX:+CRIURestoreNonPortableMode</variation>
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
Expand Down Expand Up @@ -417,6 +483,12 @@
<variations>
<variation>-XX:+CRIURestoreNonPortableMode -Denable.j9internal.checkpoint.security.api.debug=true</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuSecurityScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
Expand All @@ -443,6 +515,12 @@
<variations>
<variation>-Denable.j9internal.checkpoint.security.api.debug=true</variation>
</variations>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
<platform>ppc64le.*</platform>
</disable>
</disables>
<command>
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuRandomScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
Expand Down
Expand Up @@ -82,35 +82,33 @@ public static void checkPointJVM(CRIUSupport criu, Path path, boolean deleteDir)
deleteCheckpointDirectory(path);
}
} else {
System.err.println("CRIU is not enabled");
throw new RuntimeException("CRIU is not enabled");
}
}

public static CRIUSupport prepareCheckPointJVM(Path path) {
CRIUSupport criu = null;
if (CRIUSupport.isCRIUSupportEnabled()) {
deleteCheckpointDirectory(path);
createCheckpointDirectory(path);
criu = new CRIUSupport(path);
return (new CRIUSupport(path)).setLeaveRunning(false).setShellJob(true).setFileLocks(true);
} else {
System.err.println("CRIU is not enabled");
throw new RuntimeException("CRIU is not enabled");
}
return criu;
}

public static void checkPointJVMNoSetup(CRIUSupport criu, Path path, boolean deleteDir) {
if (criu != null) {
try {
showThreadCurrentTime("Performing CRIUSupport.checkpointJVM()");
criu.setLeaveRunning(false).setShellJob(true).setFileLocks(true).checkpointJVM();
criu.checkpointJVM();
} catch (SystemRestoreException e) {
e.printStackTrace();
}
if (deleteDir) {
deleteCheckpointDirectory(path);
}
} else {
System.err.println("CRIU is not enabled");
throw new RuntimeException("CRIU is not enabled");
}
}

Expand Down

0 comments on commit e1b7e37

Please sign in to comment.