Skip to content

Commit 2e15576

Browse files
authored
Merge pull request #18530 from JasonFengJ9/timeelapse-0.42
(v0.42.0-release) elapsed time tests
2 parents 8e75976 + e12c419 commit 2e15576

File tree

9 files changed

+169
-152
lines changed

9 files changed

+169
-152
lines changed

runtime/criusupport/criusupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,13 @@ Java_org_eclipse_openj9_criu_CRIUSupport_checkpointJVMImpl(JNIEnv *env,
656656
bool setupCRIU = true;
657657
PORT_ACCESS_FROM_VMC(currentThread);
658658

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

663664
vm->checkpointState.checkpointThread = currentThread;
664665

665-
Trc_CRIU_checkpointJVMImpl_Entry(currentThread);
666666
if (vmFuncs->isCheckpointAllowed(currentThread) && setupCRIU) {
667667
#if defined(LINUX)
668668
j9object_t cpDir = NULL;

test/functional/cmdLineTests/criu/playlist.xml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
<variation>-Xint -XX:+CRIURestoreNonPortableMode</variation>
6666
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
6767
</variations>
68+
<disables>
69+
<disable>
70+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
71+
<platform>ppc64le.*</platform>
72+
</disable>
73+
</disables>
6874
<command>
6975
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
7076
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
@@ -99,6 +105,12 @@
99105
<variation>-Xgcpolicy:gencon -Xgcthreads64 -XX:CheckpointGCThreads=1</variation>
100106
<variation>-Xgcpolicy:gencon -Xgcthreads1</variation>
101107
</variations>
108+
<disables>
109+
<disable>
110+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
111+
<platform>ppc64le.*</platform>
112+
</disable>
113+
</disables>
102114
<command>
103115
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) \
104116
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -128,6 +140,12 @@
128140
<variation>-Xjit:count=0</variation>
129141
<variation>-Xjit:vlog=vlog</variation>
130142
</variations>
143+
<disables>
144+
<disable>
145+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
146+
<platform>ppc64le.*</platform>
147+
</disable>
148+
</disables>
131149
<command>
132150
TR_Options=$(Q)disableSuffixLogs$(Q) \
133151
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -156,6 +174,12 @@
156174
<variations>
157175
<variation>NoOptions</variation>
158176
</variations>
177+
<disables>
178+
<disable>
179+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
180+
<platform>ppc64le.*</platform>
181+
</disable>
182+
</disables>
159183
<command>
160184
if [ -x $(Q)$(TEST_JDK_BIN)$(D)jitserver$(Q) ]; \
161185
then \
@@ -195,6 +219,12 @@
195219
<variation>-Xjit:vlog=vlog</variation>
196220
<variation>-XX:+JVMPortableRestoreMode</variation>
197221
</variations>
222+
<disables>
223+
<disable>
224+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
225+
<platform>ppc64le.*</platform>
226+
</disable>
227+
</disables>
198228
<command>
199229
if [ -x $(Q)$(TEST_JDK_BIN)$(D)jitserver$(Q) ]; \
200230
then \
@@ -234,6 +264,12 @@
234264
<variation>-Xgcpolicy:optthruput</variation>
235265
<variation>-Xgcpolicy:optavgpause</variation>
236266
</variations>
267+
<disables>
268+
<disable>
269+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
270+
<platform>ppc64le.*</platform>
271+
</disable>
272+
</disables>
237273
<command>
238274
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) \
239275
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -265,6 +301,12 @@
265301
<variation>-Xgcpolicy:optthruput</variation>
266302
<variation>-Xgcpolicy:optavgpause</variation>
267303
</variations>
304+
<disables>
305+
<disable>
306+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
307+
<platform>ppc64le.*</platform>
308+
</disable>
309+
</disables>
268310
<command>
269311
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) \
270312
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -296,6 +338,12 @@
296338
<variation>-Xgcpolicy:optthruput</variation>
297339
<variation>-Xgcpolicy:optavgpause</variation>
298340
</variations>
341+
<disables>
342+
<disable>
343+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
344+
<platform>ppc64le.*</platform>
345+
</disable>
346+
</disables>
299347
<command>
300348
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) \
301349
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -327,6 +375,12 @@
327375
<variation>-Xgcpolicy:optthruput</variation>
328376
<variation>-Xgcpolicy:optavgpause</variation>
329377
</variations>
378+
<disables>
379+
<disable>
380+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
381+
<platform>ppc64le.*</platform>
382+
</disable>
383+
</disables>
330384
<command>
331385
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) \
332386
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
@@ -357,6 +411,12 @@
357411
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
358412
<variation>-XX:+JVMPortableRestoreMode</variation>
359413
</variations>
414+
<disables>
415+
<disable>
416+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
417+
<platform>ppc64le.*</platform>
418+
</disable>
419+
</disables>
360420
<command>
361421
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
362422
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
@@ -388,6 +448,12 @@
388448
<variation>-Xint -XX:+CRIURestoreNonPortableMode</variation>
389449
<variation>-Xjit:count=0 -XX:+CRIURestoreNonPortableMode</variation>
390450
</variations>
451+
<disables>
452+
<disable>
453+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
454+
<platform>ppc64le.*</platform>
455+
</disable>
456+
</disables>
391457
<command>
392458
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
393459
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
@@ -417,6 +483,12 @@
417483
<variations>
418484
<variation>-XX:+CRIURestoreNonPortableMode -Denable.j9internal.checkpoint.security.api.debug=true</variation>
419485
</variations>
486+
<disables>
487+
<disable>
488+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
489+
<platform>ppc64le.*</platform>
490+
</disable>
491+
</disables>
420492
<command>
421493
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
422494
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuSecurityScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \
@@ -443,6 +515,12 @@
443515
<variations>
444516
<variation>-Denable.j9internal.checkpoint.security.api.debug=true</variation>
445517
</variations>
518+
<disables>
519+
<disable>
520+
<comment>https://github.com/eclipse-openj9/openj9/issues/18468</comment>
521+
<platform>ppc64le.*</platform>
522+
</disable>
523+
</disables>
446524
<command>
447525
$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \
448526
-DSCRIPPATH=$(TEST_RESROOT)$(D)criuRandomScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \

test/functional/cmdLineTests/criu/src/org/openj9/criu/CRIUTestUtils.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,35 +82,33 @@ public static void checkPointJVM(CRIUSupport criu, Path path, boolean deleteDir)
8282
deleteCheckpointDirectory(path);
8383
}
8484
} else {
85-
System.err.println("CRIU is not enabled");
85+
throw new RuntimeException("CRIU is not enabled");
8686
}
8787
}
8888

8989
public static CRIUSupport prepareCheckPointJVM(Path path) {
90-
CRIUSupport criu = null;
9190
if (CRIUSupport.isCRIUSupportEnabled()) {
9291
deleteCheckpointDirectory(path);
9392
createCheckpointDirectory(path);
94-
criu = new CRIUSupport(path);
93+
return (new CRIUSupport(path)).setLeaveRunning(false).setShellJob(true).setFileLocks(true);
9594
} else {
96-
System.err.println("CRIU is not enabled");
95+
throw new RuntimeException("CRIU is not enabled");
9796
}
98-
return criu;
9997
}
10098

10199
public static void checkPointJVMNoSetup(CRIUSupport criu, Path path, boolean deleteDir) {
102100
if (criu != null) {
103101
try {
104102
showThreadCurrentTime("Performing CRIUSupport.checkpointJVM()");
105-
criu.setLeaveRunning(false).setShellJob(true).setFileLocks(true).checkpointJVM();
103+
criu.checkpointJVM();
106104
} catch (SystemRestoreException e) {
107105
e.printStackTrace();
108106
}
109107
if (deleteDir) {
110108
deleteCheckpointDirectory(path);
111109
}
112110
} else {
113-
System.err.println("CRIU is not enabled");
111+
throw new RuntimeException("CRIU is not enabled");
114112
}
115113
}
116114

0 commit comments

Comments
 (0)