提交 899303d9 编写于 作者: Y yunyao.zxl 提交者: zhengxiaolinX

[Wisp] Make Wisp feature experimental for Dragonwell 8.4.4 version

Summary: Change the Wisp flag to experimental

Test Plan: all Wisp tests

Reviewed-by: yuleil, shiyuexw, sanhong

Issue: https://github.com/alibaba/dragonwell8/issues/113
上级 f79dce47
......@@ -115,16 +115,16 @@
product(bool, TenantDataIsolation, false, \
"Enable data isolation(e.g static vairable) per tenant") \
\
product(bool, EnableCoroutine, false, \
experimental(bool, EnableCoroutine, false, \
"Enable coroutine support") \
\
product(uintx, DefaultCoroutineStackSize, 128*K, \
"Default size of stack that is associated with new coroutine") \
\
product(bool, UseWispMonitor, false, \
experimental(bool, UseWispMonitor, false, \
"yields to next coroutine when ObjectMonitor is contended") \
\
product(bool, UseWisp2, false, \
experimental(bool, UseWisp2, false, \
"Enable Wisp2") \
\
diagnostic(bool, VerboseWisp, false, \
......
......@@ -23,7 +23,7 @@
* @test
* @summary test a special wisp unpark case for C1 compiled method
* @requires os.family == "linux"
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:TieredStopAtLevel=1 C1ThrowSyncExceptionTest
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:TieredStopAtLevel=1 C1ThrowSyncExceptionTest
*/
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary test fix of parallel class-loading problem when we're using coroutine
* @requires os.family == "linux"
* @run main/othervm -Xmx20m -XX:+AllowParallelDefineClass -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true ClassCircularityTest
* @run main/othervm -Xmx20m -XX:+AllowParallelDefineClass -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true ClassCircularityTest
*/
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary Test the optimization of direct unpark with Object.wait/notify
* @requires os.family == "linux"
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.enableThreadAsWisp=true -Dcom.alibaba.wisp.version=2 -Dcom.alibaba.wisp.allThreadAsWisp=true DirectUnparkTest
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.enableThreadAsWisp=true -Dcom.alibaba.wisp.version=2 -Dcom.alibaba.wisp.allThreadAsWisp=true DirectUnparkTest
*/
import com.alibaba.wisp.engine.WispEngine;
......
......@@ -24,7 +24,7 @@
* @summary test obj.wait() could be interrupted
* @requires os.family == "linux"
* @library /testlibrary
* @run main/othervm -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true InterruptedWaitTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true InterruptedWaitTest
*/
import java.util.concurrent.atomic.AtomicBoolean;
......
......@@ -24,7 +24,7 @@
* @library /testlibrary /testlibrary/whitebox
* @build Issue11230146
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -XX:-Inline -XX:+EnableCoroutine -Xmx10m -Xms10m -XX:ReservedCodeCacheSize=3m -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI Issue11230146
* @run main/othervm -XX:-Inline -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Xmx10m -Xms10m -XX:ReservedCodeCacheSize=3m -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI Issue11230146
* @summary Issue11230146, JTreg test for D181275
* @requires os.family == "linux"
*/
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary Test jstack steal counter
* @requires os.family == "linux"
* @run main/othervm -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:ActiveProcessorCount=2 JStackTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:ActiveProcessorCount=2 JStackTest
*/
import com.alibaba.wisp.engine.WispEngine;
......
......@@ -23,7 +23,7 @@
* @test
* @summary test of memory leak while creating and destroying coroutine/thread
* @requires os.family == "linux"
* @run main/othervm -XX:+EnableCoroutine -Xmx10m -Xms10m MemLeakTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Xmx10m -Xms10m MemLeakTest
*/
import java.dyn.Coroutine;
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary Test jstack coroutine output
* @requires os.family == "linux"
* @run main/othervm -XX:+EnableCoroutine -Dcom.alibaba.transparentAsync=true -XX:+UseWispMonitor MultiCoroutineStackTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Dcom.alibaba.transparentAsync=true -XX:+UseWispMonitor MultiCoroutineStackTest
*/
import com.alibaba.wisp.engine.WispEngine;
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary test wisp preempt
* @requires os.family == "linux"
* @run main/othervm -XX:+EnableCoroutine -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.carrierEngines=1 -Dcom.alibaba.wisp.enableHandOff=true PreemptExceptionTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.carrierEngines=1 -Dcom.alibaba.wisp.enableHandOff=true PreemptExceptionTest
*/
import java.security.MessageDigest;
......
......@@ -42,6 +42,7 @@ public class PreemptWispInternalBugTest {
if (args.length == 0) {
for (int i = 0; i < tasks.length; i++) {
ProcessBuilder pb = com.oracle.java.testlibrary.ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseWisp2", "-XX:+UnlockDiagnosticVMOptions", "-XX:+VerboseWisp", "-XX:-Inline",
PreemptWispInternalBugTest.class.getName(), tasks[i]);
com.oracle.java.testlibrary.OutputAnalyzer output = new com.oracle.java.testlibrary.OutputAnalyzer(pb.start());
......
......@@ -24,7 +24,7 @@
* @library /testlibrary /testlibrary/whitebox
* @build TestAvoidDeoptCoroutineMethod
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -XX:+EnableCoroutine -Xmx10m -Xms10m -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestAvoidDeoptCoroutineMethod
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Xmx10m -Xms10m -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestAvoidDeoptCoroutineMethod
* @summary test avoid coroutine intrinsic method to be deoptimized
* @requires os.family == "linux"
*/
......
......@@ -24,7 +24,7 @@
* @summary Test invoke dynamic class for lambda with interrupt
* @requires os.family == "linux"
* @library /testlibrary
* @run main/othervm -XX:+EnableCoroutine -Dcom.alibaba.wisp.transparentWispSwitch=true -XX:+UseWispMonitor -Dcom.alibaba.wisp.enableHandOff=false -XX:+AllowParallelDefineClass TestInvokeDynamicInterruption
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Dcom.alibaba.wisp.transparentWispSwitch=true -XX:+UseWispMonitor -Dcom.alibaba.wisp.enableHandOff=false -XX:+AllowParallelDefineClass TestInvokeDynamicInterruption
*/
import com.alibaba.wisp.engine.WispEngine;
......
......@@ -23,10 +23,10 @@
* @test
* @summary PreserveFramePointer for coroutine stack backtrace test
* @requires os.family == "linux"
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:TieredStopAtLevel=1 -XX:+PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:TieredStopAtLevel=1 -XX:-PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:-TieredCompilation -XX:+PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:-TieredCompilation -XX:-PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:TieredStopAtLevel=1 -XX:+PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:TieredStopAtLevel=1 -XX:-PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:-TieredCompilation -XX:+PreserveFramePointer TestPreserveFramePointer
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true -Dcom.alibaba.wisp.version=2 -Xcomp -XX:-TieredCompilation -XX:-PreserveFramePointer TestPreserveFramePointer
*/
......
......@@ -34,28 +34,36 @@ public class Wisp2FlagCompatibilityCheckTest {
ProcessBuilder pb;
OutputAnalyzer output;
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseWisp2",
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseWisp2",
"-XX:-UseWispMonitor",
"-version");
output = new OutputAnalyzer(pb.start());
output.shouldContain("Wisp2 needs to enable -XX:+UseWispMonitor");
System.out.println(output.getOutput());
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseWisp2",
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseWisp2",
"-XX:-EnableCoroutine",
"-version");
output = new OutputAnalyzer(pb.start());
output.shouldContain("Wisp2 needs to enable -XX:+EnableCoroutine");
System.out.println(output.getOutput());
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseWisp2",
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseWisp2",
"-XX:+UseBiasedLocking",
"-version");
output = new OutputAnalyzer(pb.start());
output.shouldContain("Biased Locking is not supported with Wisp2");
System.out.println(output.getOutput());
pb = ProcessTools.createJavaProcessBuilder("-XX:+EnableCoroutine",
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockExperimentalVMOptions",
"-XX:+EnableCoroutine",
"-XX:+UseBiasedLocking",
"-version");
output = new OutputAnalyzer(pb.start());
......
......@@ -3,7 +3,7 @@
* @summary test wisp2 switch
* @requires os.family == "linux"
* @library /testlibrary
* @run main/othervm -XX:+UseWisp2 Wisp2SwitchTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 Wisp2SwitchTest
*/
......
......@@ -24,7 +24,7 @@
* @summary test XX:+UseWisp2 switch with -Dcom.alibaba.wisp.allThreadAsWisp=false
* @requires os.family == "linux"
* @library /testlibrary
* @run main/othervm -XX:+UseWisp2 -Dcom.alibaba.wisp.allThreadAsWisp=false Wisp2SwitchTest2
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 -Dcom.alibaba.wisp.allThreadAsWisp=false Wisp2SwitchTest2
*/
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary test clinit wait in coroutine
* @requires os.family == "linux"
* @run main/othervm -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true WispClinitTest
* @run main/othervm -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true WispClinitTest
*/
......
......@@ -24,7 +24,7 @@
* @library /testlibrary
* @summary test emit_guard_for_new in C2 will add control for load
* @requires os.family == "linux"
* @run main/othervm -Xcomp -XX:-TieredCompilation -Xbatch -XX:CompileOnly=WispEmitNewGuardTest.testMethod -XX:+PrintCompilation -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true WispEmitNewGuardTest
* @run main/othervm -Xcomp -XX:-TieredCompilation -Xbatch -XX:CompileOnly=WispEmitNewGuardTest.testMethod -XX:+PrintCompilation -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.wisp.transparentWispSwitch=true WispEmitNewGuardTest
*/
......
......@@ -23,7 +23,7 @@
* @test
* @summary verify vm not crash when we're preempted frequently
* @requires os.family == "linux"
* @run main/othervm -XX:ActiveProcessorCount=1 -XX:+UseWisp2 WispPreemptBugTest
* @run main/othervm -XX:ActiveProcessorCount=1 -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 WispPreemptBugTest
*/
import java.security.MessageDigest;
......
......@@ -23,7 +23,7 @@
* @test
* @summary c2 compiler monitorenter stub steal test
* @requires os.family == "linux"
* @run main/othervm/timeout=60 -XX:+UseWisp2 -Dcom.alibaba.wisp.schedule.stealRetry=100 -Dcom.alibaba.wisp.schedule.helpStealRetry=100 WispStealMonitorC2Test
* @run main/othervm/timeout=60 -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 -Dcom.alibaba.wisp.schedule.stealRetry=100 -Dcom.alibaba.wisp.schedule.helpStealRetry=100 WispStealMonitorC2Test
*/
import com.alibaba.wisp.engine.WispEngine;
......
......@@ -48,4 +48,4 @@ echo Agent-Class: ${AGENT} >> ${AGENT}.mf
${TESTJAVA}/bin/jar ${TESTTOOLVMOPTS} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class
${TESTJAVA}/bin/java -ea -esa -XX:+UseWisp2 AttachTest &
\ No newline at end of file
${TESTJAVA}/bin/java -ea -esa -XX:+UnlockExperimentalVMOptions -XX:+UseWisp2 AttachTest &
\ No newline at end of file
......@@ -28,7 +28,7 @@
## @run shell c1AssertFailTest.sh
${TESTJAVA}/bin/java -Xcomp -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true &
${TESTJAVA}/bin/java -Xcomp -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true &
PID=$!
......
......@@ -62,6 +62,6 @@ gcc -DLINUX -fPIC -shared -o libtest.so \
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
${TESTSRC}/coroutineBreakpointSwitchToTest.c
${JAVA} -agentpath:libtest.so -XX:-UseBiasedLocking -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -cp ${TESTCLASSES} SimpleWispTest
${JAVA} -agentpath:libtest.so -XX:-UseBiasedLocking -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -cp ${TESTCLASSES} SimpleWispTest
exit $?
......@@ -36,13 +36,14 @@ main()
{
JNIEnv *env;
JavaVMInitArgs vm_args; /* JDK/JRE 6 VM initialization arguments */
JavaVMOption options[4];
options[0].optionString = "-XX:+EnableCoroutine";
options[1].optionString = "-XX:-UseBiasedLocking";
options[2].optionString = "-Dcom.alibaba.transparentAsync=true";
options[3].optionString = "-XX:+UseWispMonitor";
JavaVMOption options[5];
options[0].optionString = "-XX:+UnlockExperimentalVMOptions";
options[1].optionString = "-XX:+EnableCoroutine";
options[2].optionString = "-XX:-UseBiasedLocking";
options[3].optionString = "-Dcom.alibaba.transparentAsync=true";
options[4].optionString = "-XX:+UseWispMonitor";
vm_args.version = JNI_VERSION_1_6;
vm_args.nOptions = 4;
vm_args.nOptions = 5;
vm_args.options = options;
vm_args.ignoreUnrecognized = false;
/* load and initialize a Java VM, return a JNI interface
......
......@@ -36,13 +36,14 @@ main()
{
JNIEnv *env;
JavaVMInitArgs vm_args; /* JDK/JRE 6 VM initialization arguments */
JavaVMOption options[4];
options[0].optionString = "-XX:+EnableCoroutine";
options[1].optionString = "-XX:-UseBiasedLocking";
options[2].optionString = "-Dcom.alibaba.transparentAsync=true";
options[3].optionString = "-XX:+UseWispMonitor";
JavaVMOption options[5];
options[0].optionString = "-XX:+UnlockExperimentalVMOptions";
options[1].optionString = "-XX:+EnableCoroutine";
options[2].optionString = "-XX:-UseBiasedLocking";
options[3].optionString = "-Dcom.alibaba.transparentAsync=true";
options[4].optionString = "-XX:+UseWispMonitor";
vm_args.version = JNI_VERSION_1_6;
vm_args.nOptions = 4;
vm_args.nOptions = 5;
vm_args.options = options;
vm_args.ignoreUnrecognized = false;
/* load and initialize a Java VM, return a JNI interface
......
......@@ -28,7 +28,7 @@
## @run shell jvmtiWispMonitorTest.sh
${TESTJAVA}/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005 -XX:+EnableCoroutine -XX:+UseWispMonitor &
${TESTJAVA}/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005 -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor &
PID=$!
......
......@@ -50,6 +50,6 @@ esac
JAVA=${TESTJAVA}${FS}bin${FS}java
${JAVA} -XX:+UnlockDiagnosticVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:+LogCompilation -Xcomp -cp ${TESTCLASSES} SimpleWispTest
${JAVA} -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -XX:+UseWispMonitor -Dcom.alibaba.transparentAsync=true -XX:+LogCompilation -Xcomp -cp ${TESTCLASSES} SimpleWispTest
exit $?
\ No newline at end of file
......@@ -53,5 +53,5 @@ done
${TESTJAVA}/bin/jar ${TESTTOOLVMOPTS} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class
${TESTJAVA}/bin/java -XX:+EnableCoroutine -Dcom.alibaba.transparentAsync=true -XX:+UseWispMonitor \
${TESTJAVA}/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableCoroutine -Dcom.alibaba.transparentAsync=true -XX:+UseWispMonitor \
-javaagent:PremainWithWispMonitorTest.jar PremainWithWispMonitorTest
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册