-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: 1. Fix StackOverflow casued by coroutine switch. Coroutine switch should update thread stack information correctly. 2. Make SharedRuntime::monitor_exit_helper can work in JRT_LEAF(no safepoint) for coroutine. 3. _class_to_be_initialized should be bound to WispThread in UseWispMonitor. 4. Thread constructor's thread id is protected by synchronized. It may introduce another unintended context switch which cause assertion failure. Use AtomicInteger instead to avoid it. 5. Fix macros THREAD do not change to WispThread when enable UseWispMonitor. Therefore, methods that use THREAD will do uncorrectly. 6. Update thread object for coroutine WispThread. Refine print_stack_header_on to not return oop. 7. Fix Exceptions::_throw_msg use wrong thread in Wisp. 8. Fix setThreadWrapper in WispTask. Add method to print info in native to avoid synchroize. 9. Fix ReservedStackTest crash in slowdebug. The crash root cause is stack_guard_state is inconsistent. The following contributes to it: - stack_guard_state is not updated correclty in coroutine switch. I think it is not a critical reason. In switch, stack_guard_state should always be stack_guard_enabled. - During reserved stack activation, its stack is too large to exceed to yellow zone to trigger another nested enable_stack_yellow_reserved_zone(). We detect the nested yellow zone and fix the state in this patch. After the patch, the crash is fixed but the test is still fail because of https://bugs.openjdk.org/browse/JDK-8231031. Several improvements as follows: - Make coroutine stack and thread share the same StackOverflow. 10. Fix JRT_LEAF method can not do oops correctly when use Wisp. In java17, InterpreterRuntime::monitorexit and some other monitorexit methods are defined as JRT_LEAF and call them with call_VM_leaf. JRT_LEAF don't allow to call Java methods or break safepoint, so we need to define a new method monitorexit_wisp with JRT_ENTRY_NO_ASYNC and call it with call_VM to make GC do correctly. 11. Fix setThreadWrapper repeatedly when Task is reused by Thread and it's last wrapper is WispThreadWrapper. Test Plan: all wisp cases Reviewed-by: yulei Issue: #103
- Loading branch information
Showing
43 changed files
with
498 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.