From f79dce477b72799dbec94e3e1db87b37578f7950 Mon Sep 17 00:00:00 2001 From: "yunyao.zxl" Date: Thu, 30 Jul 2020 10:16:52 +0800 Subject: [PATCH] [Wisp] Fix Windows and MacOS capability Summary: Fix build failure of the two platforms Test Plan: Successfully generate builds of the two platforms Reviewed-by: yuleil, shiyuexw, sanhong Issue: https://github.com/alibaba/dragonwell8/issues/113 --- make/bsd/makefiles/mapfile-vers-debug | 5 ++++ make/bsd/makefiles/mapfile-vers-product | 5 ++++ src/cpu/x86/vm/assembler_x86.hpp | 4 ++- src/os/linux/vm/os_linux.cpp | 12 -------- src/share/vm/classfile/javaClasses.cpp | 2 +- src/share/vm/classfile/javaClasses.hpp | 2 +- src/share/vm/runtime/arguments.cpp | 8 +++++ src/share/vm/runtime/coroutine.cpp | 30 +++++++++++-------- src/share/vm/runtime/coroutine.hpp | 7 +++-- src/share/vm/runtime/os.hpp | 2 -- .../coroutine/C1ThrowSyncExceptionTest.java | 1 + .../coroutine/ClassCircularityTest.java | 1 + test/runtime/coroutine/DirectUnparkTest.java | 1 + .../coroutine/InterruptedWaitTest.java | 1 + test/runtime/coroutine/Issue11230146.java | 1 + test/runtime/coroutine/JStackTest.java | 1 + test/runtime/coroutine/MemLeakTest.java | 1 + .../coroutine/MultiCoroutineStackTest.java | 1 + .../coroutine/PreemptExceptionTest.java | 1 + .../coroutine/PreemptWispInternalBugTest.java | 1 + .../coroutine/PremainWithWispMonitorTest.java | 2 +- .../TestAvoidDeoptCoroutineMethod.java | 1 + .../TestInvokeDynamicInterruption.java | 1 + .../coroutine/TestPreserveFramePointer.java | 1 + .../Wisp2FlagCompatibilityCheckTest.java | 2 +- test/runtime/coroutine/Wisp2SwitchTest.java | 1 + test/runtime/coroutine/Wisp2SwitchTest2.java | 1 + test/runtime/coroutine/WispClinitTest.java | 1 + .../coroutine/WispEmitNewGuardTest.java | 1 + .../runtime/coroutine/WispPreemptBugTest.java | 1 + .../coroutine/WispStealMonitorC2Test.java | 1 + test/runtime/coroutine/c1AssertFailTest.sh | 1 + .../coroutineBreakpointSwitchToTest.sh | 1 + .../jniDetachThreadHoldingMonitorTest.sh | 1 + test/runtime/coroutine/jniMonitorExitTest.sh | 1 + .../runtime/coroutine/jvmtiWispMonitorTest.sh | 1 + test/runtime/coroutine/logCompilationTest.sh | 1 + 37 files changed, 72 insertions(+), 34 deletions(-) diff --git a/make/bsd/makefiles/mapfile-vers-debug b/make/bsd/makefiles/mapfile-vers-debug index 4e44d66ba..5fdc15710 100644 --- a/make/bsd/makefiles/mapfile-vers-debug +++ b/make/bsd/makefiles/mapfile-vers-debug @@ -39,6 +39,7 @@ _JVM_Available _JVM_BeforeHalt _JVM_Bind + _JVM_CheckAndClearNativeInterruptForWisp _JVM_CheckJWarmUpCompilationIsComplete _JVM_ClassDepth _JVM_ClassLoaderDepth @@ -167,6 +168,7 @@ _JVM_GetMethodTypeAnnotations _JVM_GetPrimitiveArrayElement _JVM_GetProtectionDomain + _JVM_GetProxyUnpark _JVM_GetSockName _JVM_GetSockOpt _JVM_GetStackAccessControlContext @@ -190,6 +192,7 @@ _JVM_InvokeMethod _JVM_IsArrayClass _JVM_IsConstructorIx + _JVM_IsInSameNative _JVM_IsInterface _JVM_IsInterrupted _JVM_IsNaN @@ -207,6 +210,7 @@ _JVM_LoadClass0 _JVM_LoadLibrary _JVM_Lseek + _JVM_MarkPreempted _JVM_MaxObjectInspectionAge _JVM_MaxMemory _JVM_MonitorNotify @@ -241,6 +245,7 @@ _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement _JVM_SetSockOpt + _JVM_SetWispTask _JVM_SetThreadPriority _JVM_Sleep _JVM_Socket diff --git a/make/bsd/makefiles/mapfile-vers-product b/make/bsd/makefiles/mapfile-vers-product index e3e4b8814..a9389cad7 100644 --- a/make/bsd/makefiles/mapfile-vers-product +++ b/make/bsd/makefiles/mapfile-vers-product @@ -39,6 +39,7 @@ _JVM_Available _JVM_BeforeHalt _JVM_Bind + _JVM_CheckAndClearNativeInterruptForWisp _JVM_CheckJWarmUpCompilationIsComplete _JVM_ClassDepth _JVM_ClassLoaderDepth @@ -167,6 +168,7 @@ _JVM_GetMethodTypeAnnotations _JVM_GetPrimitiveArrayElement _JVM_GetProtectionDomain + _JVM_GetProxyUnpark _JVM_GetSockName _JVM_GetSockOpt _JVM_GetStackAccessControlContext @@ -190,6 +192,7 @@ _JVM_InvokeMethod _JVM_IsArrayClass _JVM_IsConstructorIx + _JVM_IsInSameNative _JVM_IsInterface _JVM_IsInterrupted _JVM_IsNaN @@ -207,6 +210,7 @@ _JVM_LoadClass0 _JVM_LoadLibrary _JVM_Lseek + _JVM_MarkPreempted _JVM_MaxObjectInspectionAge _JVM_MaxMemory _JVM_MonitorNotify @@ -241,6 +245,7 @@ _JVM_SetNativeThreadName _JVM_SetPrimitiveArrayElement _JVM_SetSockOpt + _JVM_SetWispTask _JVM_SetThreadPriority _JVM_Sleep _JVM_Socket diff --git a/src/cpu/x86/vm/assembler_x86.hpp b/src/cpu/x86/vm/assembler_x86.hpp index 5ea01311e..eee5e52ca 100644 --- a/src/cpu/x86/vm/assembler_x86.hpp +++ b/src/cpu/x86/vm/assembler_x86.hpp @@ -817,7 +817,9 @@ private: // End avoid using directly - +#ifdef _WINDOWS + public: +#endif // Instruction prefixes void prefix(Prefix p); diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp index e6d30da9c..a699a066e 100644 --- a/src/os/linux/vm/os_linux.cpp +++ b/src/os/linux/vm/os_linux.cpp @@ -4528,18 +4528,6 @@ void os::interrupt(Thread* thread) { } -bool clear_interrupt_for_wisp(Thread* thread) { - // If we only use -XX:+EnableCoroutine and -Dcom.alibaba.transparentAsync=true, we will - // fall here, so we cannot use `assert(UseWispMonitor)` only. - if (UseWispMonitor && thread->is_Wisp_thread()) { - thread = ((WispThread *)thread)->thread(); - } - bool interrupted = thread->osthread()->interrupted(); - thread->osthread()->set_interrupted(false); - - return interrupted; -} - bool os::is_interrupted(Thread* thread, bool clear_interrupted) { if (UseWispMonitor && thread->is_Wisp_thread()) { thread = ((WispThread*) thread)->thread(); diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp index 8234f5ba8..25889f14e 100644 --- a/src/share/vm/classfile/javaClasses.cpp +++ b/src/share/vm/classfile/javaClasses.cpp @@ -3413,7 +3413,7 @@ void com_alibaba_wisp_engine_WispCarrier::compute_offsets() { compute_offset(_isInCritical_offset, k, vmSymbols::isInCritical_name(), vmSymbols::bool_signature()); } -bool com_alibaba_wisp_engine_WispCarrier::in_critical(oop obj) { +jboolean com_alibaba_wisp_engine_WispCarrier::in_critical(oop obj) { return obj->bool_field(_isInCritical_offset); } diff --git a/src/share/vm/classfile/javaClasses.hpp b/src/share/vm/classfile/javaClasses.hpp index 9f36beaad..42a47836e 100644 --- a/src/share/vm/classfile/javaClasses.hpp +++ b/src/share/vm/classfile/javaClasses.hpp @@ -1504,7 +1504,7 @@ class com_alibaba_wisp_engine_WispCarrier: AllStatic { private: static int _isInCritical_offset; public: - static bool in_critical(oop obj); + static jboolean in_critical(oop obj); static void compute_offsets(); }; diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp index d15a5a29a..9e079cd3a 100644 --- a/src/share/vm/runtime/arguments.cpp +++ b/src/share/vm/runtime/arguments.cpp @@ -4130,6 +4130,14 @@ jint Arguments::parse(const JavaVMInitArgs* args) { } } +#ifndef LINUX + if (EnableCoroutine || UseWispMonitor) { + warning("Wisp supports Linux only" + "; ignore Wisp related flags"); + EnableCoroutine = UseWispMonitor = false; + } +#endif + // Set object alignment values. set_object_alignment(); diff --git a/src/share/vm/runtime/coroutine.cpp b/src/share/vm/runtime/coroutine.cpp index 023e0b71b..f3400af04 100644 --- a/src/share/vm/runtime/coroutine.cpp +++ b/src/share/vm/runtime/coroutine.cpp @@ -48,18 +48,12 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo); void coroutine_start(Coroutine* coroutine, jobject coroutineObj) { coroutine->thread()->set_thread_state(_thread_in_vm); - if (UseVectoredExceptions) { - // If we are using vectored exception we don't need to set a SEH - coroutine->run(coroutineObj); - } - else { - // Install a win32 structured exception handler around every thread created - // by VM, so VM can genrate error dump when an exception occurred in non- - // Java thread (e.g. VM thread). - __try { - coroutine->run(coroutineObj); - } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { - } + // Install a win32 structured exception handler around every thread created + // by VM, so VM can genrate error dump when an exception occurred in non- + // Java thread (e.g. VM thread). + __try { + coroutine->run(coroutineObj); + } __except(topLevelExceptionFilter((_EXCEPTION_POINTERS*)_exception_info())) { } ShouldNotReachHere(); @@ -1208,3 +1202,15 @@ WispClinitCounterMark::~WispClinitCounterMark() { _thread->current_coroutine()->dec_clinit_call_count(); } } + +bool clear_interrupt_for_wisp(Thread* thread) { + // If we only use -XX:+EnableCoroutine and -Dcom.alibaba.transparentAsync=true, we will + // fall here, so we cannot use `assert(UseWispMonitor)` only. + if (UseWispMonitor && thread->is_Wisp_thread()) { + thread = ((WispThread *)thread)->thread(); + } + bool interrupted = thread->osthread()->interrupted(); + thread->osthread()->set_interrupted(false); + + return interrupted; +} \ No newline at end of file diff --git a/src/share/vm/runtime/coroutine.hpp b/src/share/vm/runtime/coroutine.hpp index 844066d00..6801a03a9 100644 --- a/src/share/vm/runtime/coroutine.hpp +++ b/src/share/vm/runtime/coroutine.hpp @@ -168,7 +168,7 @@ public: void set_wisp_task(oop x) { _wisp_task = x; } oop coroutine() const { return _coroutine; } - oop set_coroutine(oop x) { _coroutine = x; } + void set_coroutine(oop x) { _coroutine = x; } WispThread* wisp_thread() const { return _wisp_thread; } @@ -324,8 +324,7 @@ template void DoublyLinkedList::insert_into_list(pointer& list) { } } -template void DoublyLinkedList::move(DoublyLinkedList::pointer &coro, - DoublyLinkedList::pointer &target) { +template void DoublyLinkedList::move(pointer &coro, pointer &target) { assert(coro != NULL, "coroutine can't be null"); assert(target != NULL, "target can't be null"); assert(coro != target, "target can't be equal to current"); @@ -618,4 +617,6 @@ private: JavaThread* _thread; }; +bool clear_interrupt_for_wisp(Thread *); + #endif // SHARE_VM_RUNTIME_COROUTINE_HPP diff --git a/src/share/vm/runtime/os.hpp b/src/share/vm/runtime/os.hpp index 496673ea6..1f74ebcc6 100644 --- a/src/share/vm/runtime/os.hpp +++ b/src/share/vm/runtime/os.hpp @@ -1044,6 +1044,4 @@ class os: AllStatic { extern "C" int SpinPause(); -bool clear_interrupt_for_wisp(Thread *); - #endif // SHARE_VM_RUNTIME_OS_HPP diff --git a/test/runtime/coroutine/C1ThrowSyncExceptionTest.java b/test/runtime/coroutine/C1ThrowSyncExceptionTest.java index 3d6553a93..afece6dff 100644 --- a/test/runtime/coroutine/C1ThrowSyncExceptionTest.java +++ b/test/runtime/coroutine/C1ThrowSyncExceptionTest.java @@ -22,6 +22,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 */ diff --git a/test/runtime/coroutine/ClassCircularityTest.java b/test/runtime/coroutine/ClassCircularityTest.java index e27d85429..b04a3c08b 100644 --- a/test/runtime/coroutine/ClassCircularityTest.java +++ b/test/runtime/coroutine/ClassCircularityTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/DirectUnparkTest.java b/test/runtime/coroutine/DirectUnparkTest.java index 14a0b4123..3e8514e8e 100644 --- a/test/runtime/coroutine/DirectUnparkTest.java +++ b/test/runtime/coroutine/DirectUnparkTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/InterruptedWaitTest.java b/test/runtime/coroutine/InterruptedWaitTest.java index 18dae1f76..1ba158d45 100644 --- a/test/runtime/coroutine/InterruptedWaitTest.java +++ b/test/runtime/coroutine/InterruptedWaitTest.java @@ -22,6 +22,7 @@ /* * @test * @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 */ diff --git a/test/runtime/coroutine/Issue11230146.java b/test/runtime/coroutine/Issue11230146.java index e5f412f7c..e375ab94b 100644 --- a/test/runtime/coroutine/Issue11230146.java +++ b/test/runtime/coroutine/Issue11230146.java @@ -26,6 +26,7 @@ * @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 * @summary Issue11230146, JTreg test for D181275 + * @requires os.family == "linux" */ import sun.hotspot.WhiteBox; diff --git a/test/runtime/coroutine/JStackTest.java b/test/runtime/coroutine/JStackTest.java index 058e2714a..b80f26d6c 100644 --- a/test/runtime/coroutine/JStackTest.java +++ b/test/runtime/coroutine/JStackTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/MemLeakTest.java b/test/runtime/coroutine/MemLeakTest.java index cc6817dfc..c28e96d8c 100644 --- a/test/runtime/coroutine/MemLeakTest.java +++ b/test/runtime/coroutine/MemLeakTest.java @@ -22,6 +22,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 */ diff --git a/test/runtime/coroutine/MultiCoroutineStackTest.java b/test/runtime/coroutine/MultiCoroutineStackTest.java index cf34ead64..e7cc4c90b 100644 --- a/test/runtime/coroutine/MultiCoroutineStackTest.java +++ b/test/runtime/coroutine/MultiCoroutineStackTest.java @@ -23,6 +23,7 @@ * @test * @library /testlibrary * @summary Test jstack coroutine output + * @requires os.family == "linux" * @run main/othervm -XX:+EnableCoroutine -Dcom.alibaba.transparentAsync=true -XX:+UseWispMonitor MultiCoroutineStackTest */ diff --git a/test/runtime/coroutine/PreemptExceptionTest.java b/test/runtime/coroutine/PreemptExceptionTest.java index afa82f52e..8f18139c1 100644 --- a/test/runtime/coroutine/PreemptExceptionTest.java +++ b/test/runtime/coroutine/PreemptExceptionTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/PreemptWispInternalBugTest.java b/test/runtime/coroutine/PreemptWispInternalBugTest.java index 42e22e9dd..d386ff6ce 100644 --- a/test/runtime/coroutine/PreemptWispInternalBugTest.java +++ b/test/runtime/coroutine/PreemptWispInternalBugTest.java @@ -22,6 +22,7 @@ /* * @test * @summary Verify wisp internal logic can not be preempted + * @requires os.family == "linux" * @library /testlibrary * @run main PreemptWispInternalBugTest */ diff --git a/test/runtime/coroutine/PremainWithWispMonitorTest.java b/test/runtime/coroutine/PremainWithWispMonitorTest.java index 127b9353e..c47f44c99 100644 --- a/test/runtime/coroutine/PremainWithWispMonitorTest.java +++ b/test/runtime/coroutine/PremainWithWispMonitorTest.java @@ -22,7 +22,7 @@ /* * @test * @summary Test the fix that unpark might not be handled in WispThread::unpark due to due to WispEngine of main thread not properly been initialized in premain(). - * + * @requires os.family == "linux" * @run shell premainWithWispMonitorTest.sh */ diff --git a/test/runtime/coroutine/TestAvoidDeoptCoroutineMethod.java b/test/runtime/coroutine/TestAvoidDeoptCoroutineMethod.java index 68abea8f0..71e38c2e0 100644 --- a/test/runtime/coroutine/TestAvoidDeoptCoroutineMethod.java +++ b/test/runtime/coroutine/TestAvoidDeoptCoroutineMethod.java @@ -26,6 +26,7 @@ * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -XX:+EnableCoroutine -Xmx10m -Xms10m -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestAvoidDeoptCoroutineMethod * @summary test avoid coroutine intrinsic method to be deoptimized + * @requires os.family == "linux" */ import sun.hotspot.WhiteBox; diff --git a/test/runtime/coroutine/TestInvokeDynamicInterruption.java b/test/runtime/coroutine/TestInvokeDynamicInterruption.java index f9db843cf..db31468b0 100644 --- a/test/runtime/coroutine/TestInvokeDynamicInterruption.java +++ b/test/runtime/coroutine/TestInvokeDynamicInterruption.java @@ -22,6 +22,7 @@ /* * @test * @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 */ diff --git a/test/runtime/coroutine/TestPreserveFramePointer.java b/test/runtime/coroutine/TestPreserveFramePointer.java index 5e78ce3f0..6692b5308 100644 --- a/test/runtime/coroutine/TestPreserveFramePointer.java +++ b/test/runtime/coroutine/TestPreserveFramePointer.java @@ -22,6 +22,7 @@ /* * @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 diff --git a/test/runtime/coroutine/Wisp2FlagCompatibilityCheckTest.java b/test/runtime/coroutine/Wisp2FlagCompatibilityCheckTest.java index 2495711c0..118dcecda 100644 --- a/test/runtime/coroutine/Wisp2FlagCompatibilityCheckTest.java +++ b/test/runtime/coroutine/Wisp2FlagCompatibilityCheckTest.java @@ -25,7 +25,7 @@ import java.io.File; /* * @test * @summary Test Wisp2 flag Compatibility - * + * @requires os.family == "linux" * @library /testlibrary * @run main Wisp2FlagCompatibilityCheckTest */ diff --git a/test/runtime/coroutine/Wisp2SwitchTest.java b/test/runtime/coroutine/Wisp2SwitchTest.java index c5e2d6d25..af1559613 100644 --- a/test/runtime/coroutine/Wisp2SwitchTest.java +++ b/test/runtime/coroutine/Wisp2SwitchTest.java @@ -1,6 +1,7 @@ /* * @test * @summary test wisp2 switch + * @requires os.family == "linux" * @library /testlibrary * @run main/othervm -XX:+UseWisp2 Wisp2SwitchTest */ diff --git a/test/runtime/coroutine/Wisp2SwitchTest2.java b/test/runtime/coroutine/Wisp2SwitchTest2.java index 1aea8794f..4dcb251ea 100644 --- a/test/runtime/coroutine/Wisp2SwitchTest2.java +++ b/test/runtime/coroutine/Wisp2SwitchTest2.java @@ -22,6 +22,7 @@ /* * @test * @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 */ diff --git a/test/runtime/coroutine/WispClinitTest.java b/test/runtime/coroutine/WispClinitTest.java index f8870fb5f..4873957e5 100644 --- a/test/runtime/coroutine/WispClinitTest.java +++ b/test/runtime/coroutine/WispClinitTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/WispEmitNewGuardTest.java b/test/runtime/coroutine/WispEmitNewGuardTest.java index 68f1558c8..75f1d19fd 100644 --- a/test/runtime/coroutine/WispEmitNewGuardTest.java +++ b/test/runtime/coroutine/WispEmitNewGuardTest.java @@ -23,6 +23,7 @@ * @test * @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 */ diff --git a/test/runtime/coroutine/WispPreemptBugTest.java b/test/runtime/coroutine/WispPreemptBugTest.java index b4b311d3b..339c482f6 100644 --- a/test/runtime/coroutine/WispPreemptBugTest.java +++ b/test/runtime/coroutine/WispPreemptBugTest.java @@ -22,6 +22,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 */ diff --git a/test/runtime/coroutine/WispStealMonitorC2Test.java b/test/runtime/coroutine/WispStealMonitorC2Test.java index 279da9113..25da7bc11 100644 --- a/test/runtime/coroutine/WispStealMonitorC2Test.java +++ b/test/runtime/coroutine/WispStealMonitorC2Test.java @@ -22,6 +22,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 */ diff --git a/test/runtime/coroutine/c1AssertFailTest.sh b/test/runtime/coroutine/c1AssertFailTest.sh index da31b3b2f..926663e76 100644 --- a/test/runtime/coroutine/c1AssertFailTest.sh +++ b/test/runtime/coroutine/c1AssertFailTest.sh @@ -24,6 +24,7 @@ ## @test ## ## @summary test c1 assertion failure when UseDirectUnpark is enabled (please run it in slowdebug ver.) +## @requires os.family == "linux" ## @run shell c1AssertFailTest.sh diff --git a/test/runtime/coroutine/coroutineBreakpointSwitchToTest.sh b/test/runtime/coroutine/coroutineBreakpointSwitchToTest.sh index b2ea7061f..265ddc4bb 100644 --- a/test/runtime/coroutine/coroutineBreakpointSwitchToTest.sh +++ b/test/runtime/coroutine/coroutineBreakpointSwitchToTest.sh @@ -27,6 +27,7 @@ # @compile SimpleWispTest.java # # @summary test Coroutine SwitchTo() crash problem +# @requires os.family == "linux" # @run shell coroutineBreakpointSwitchToTest.sh # diff --git a/test/runtime/coroutine/jniDetachThreadHoldingMonitorTest.sh b/test/runtime/coroutine/jniDetachThreadHoldingMonitorTest.sh index 316577335..624113c4b 100644 --- a/test/runtime/coroutine/jniDetachThreadHoldingMonitorTest.sh +++ b/test/runtime/coroutine/jniDetachThreadHoldingMonitorTest.sh @@ -24,6 +24,7 @@ ## @test ## ## @summary test DetachCurrentThread unpark +## @requires os.family == "linux" ## @run shell jniDetachThreadHoldingMonitorTest.sh ## diff --git a/test/runtime/coroutine/jniMonitorExitTest.sh b/test/runtime/coroutine/jniMonitorExitTest.sh index aea5e64bf..566be2c09 100644 --- a/test/runtime/coroutine/jniMonitorExitTest.sh +++ b/test/runtime/coroutine/jniMonitorExitTest.sh @@ -24,6 +24,7 @@ ## @test ## ## @summary test jni MonitorExit +## @requires os.family == "linux" ## @run shell jniMonitorExitTest.sh ## diff --git a/test/runtime/coroutine/jvmtiWispMonitorTest.sh b/test/runtime/coroutine/jvmtiWispMonitorTest.sh index c7e05fed7..ce76673db 100644 --- a/test/runtime/coroutine/jvmtiWispMonitorTest.sh +++ b/test/runtime/coroutine/jvmtiWispMonitorTest.sh @@ -24,6 +24,7 @@ ## @test ## ## @summary test jvmti and wispMonitor could work together +## @requires os.family == "linux" ## @run shell jvmtiWispMonitorTest.sh diff --git a/test/runtime/coroutine/logCompilationTest.sh b/test/runtime/coroutine/logCompilationTest.sh index 0b8316082..fb3a5ec1c 100644 --- a/test/runtime/coroutine/logCompilationTest.sh +++ b/test/runtime/coroutine/logCompilationTest.sh @@ -27,6 +27,7 @@ # @compile SimpleWispTest.java # # @summary test coroutine and -XX:+LogCompilation could work together +# @requires os.family == "linux" # @run shell logCompilationTest.sh # -- GitLab