Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wisp] Port Wisp1/2 to JDK17. #78

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

ZhaiMo15
Copy link

Summary:

  • Port Wisp1/2 to JDK11 includes the changes in 8.6.11_fp1
  • initializing process improvement
  • WispCounterMXBean and WispPerfCounterMonitor aren't supported

Test Plan:
test/hotspot/jtreg/runtime/coroutine/
test/jdk/com/alibaba/wisp
test/jdk/com/alibaba/wisp2

Reviewed-by: yulei

Issue:
#77

Summary:
- Port Wisp1/2 to JDK11 includes the changes in 8.6.11_fp1
- initializing process improvement
- WispCounterMXBean and WispPerfCounterMonitor aren't supported

Test Plan:
test/hotspot/jtreg/runtime/coroutine/
test/jdk/com/alibaba/wisp
test/jdk/com/alibaba/wisp2

Reviewed-by: yulei

Issue:
dragonwell-project#77
yuleil
yuleil previously approved these changes Jul 3, 2023
Copy link
Collaborator

@yuleil yuleil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Some slowdebug test failures will be fixed in later patches

@yuleil yuleil dismissed their stale review July 3, 2023 05:59

"Fix bugs in previous commit. " needs further review

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Show resolved Hide resolved
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Outdated Show resolved Hide resolved
src/hotspot/share/gc/shared/barrierSet.cpp Show resolved Hide resolved
src/hotspot/share/runtime/javaCalls.cpp Outdated Show resolved Hide resolved
src/hotspot/share/runtime/sharedRuntime.cpp Show resolved Hide resolved
src/hotspot/share/runtime/synchronizer.cpp Outdated Show resolved Hide resolved
src/hotspot/share/runtime/synchronizer.hpp Show resolved Hide resolved
test/hotspot/jtreg/runtime/coroutine/jniMonitorExitTest.sh Outdated Show resolved Hide resolved
Summary:
- Basic change such as naming convention or typo.
- Fix wrong usage of some functions.
- Add one more dereference when encouter _threadObj since it's oop* rather than oop in Java11.
- Add WispThread convertion in clinit_barrier when UseWispMonitor is enabled, because ini thread is WispThread.
- Pass correct current thread to ExceptionMark constructor in Runtime1::monitorexit_wisp.
- Modify code in test to pass hotspot and jdk jtregs.
- Fix wisp2 create property crash.
- Delete control node in make_runtime_call() since it is wrong that treating control node to memory node.
- Refine coroutine properties append logic(From JVM_GetProperties to Arguments::init_system_properties).
- Hoist code of safepoint state out of MutexLocker to prevent safepoint deadlock problem.
- Fix WispThread BarrierSet and JavaCalls assert.
- Fix Thread interrupted flag in public class Thread.
- Fix threadObj changed in coroutine steal.
- Add more debug functions for switchTo.
- Delete jniDetachThreadHoldingMonitorTest.sh, jniMonitorExitTest.sh and SelectorInitCriticalTest.java because SelectorProvider removed lock in Java17.
- test/hotspot/jtreg/runtime/jni/registerNativesWarning/TestRegisterNativesWarning.java: yield() in Thread.java is not a native method after we port wisp coroutine to JDK. Thus we use currentTimeMillis() instead.
- vmTestbase/nsk/monitoring/stress/thread/strace001/TestDescription.java: Add "java.lang.Thread.sleep0" and "java.lang.Thread.yield0" in expectedTrace, and let expectedLength = depth + 4.
- test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/ThreadController.java: Add sleep0 and yield0 in expectedMethods.
- test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace00*.java: Add sleep0 and yield0 in EXPECTED_METHODS.
- test/hotspot/jtreg/vmTestbase/nsk/monitoring/share/thread/SleepingThread.java and RunningThread.java: Add sleep0 and yield0 in expectedMethods.
- test/hotspot/jtreg/vmTestbase/nsk/share/locks/LockingThread.java: Add 1 to expectedDepth and add function myWait to add 1 more stack frame.
- test/jdk/java/beans/XMLDecoder/8028054/Task.java: Remove "java.dyn.CoroutineSupport" from fileNames.
- test/jdk/jdk/jfr/event/runtime/TestSystemPropertyEvent.java: Add "com.alibaba.coroutine.enableCoroutine" to SystemProperty.
- test/jdk/com/alibaba/wisp2/Wisp2ShutdownTest.java: Change awaitTermination time to 5 seconds, because all coroutines may not terminated in 1 second.
- Put trace_switch, print_site and coroutine_switch_trace into debug version.

Reviewed-by: yulei

Test Plan:
test/hotspot/jtreg/runtime/coroutine/
test/jdk/com/alibaba/wisp
test/jdk/com/alibaba/wisp2

Issue:
dragonwell-project#77
@yuleil yuleil merged commit 5adb2a4 into dragonwell-project:wisp Jul 6, 2023
19 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants