JDK-8265934 : Cleanup _suspend_flags and _special_runtime_exit_condition
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-04-26
  • Updated: 2021-05-20
  • Resolved: 2021-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b23Fixed
Related Reports
Relates :  
Relates :  
Description
There are a couple of cleanups that need to be done:
- Move _suspend_flags and asynchronous exception related fields from class Thread to JavaThread
- Rename _special_runtime_exit_condition to _async_exception_condition and related methods. This name has been mixed up with the suspend flags which are checked together in has_special_runtime_exit_condition() and handle_special_runtime_exit_condition().
- Decouple _suspend_flags from asynchronous exception as much as possible by removing methods has_async_exception(), set_has_async_exception() and clear_has_async_exception() associated with _suspend_flags since they create confusion as to who actually manages asynchronous exceptions. 
Comments
Changeset: 853ffdb2 Author: Patricio Chilano Mateo <pchilanomate@openjdk.org> Date: 2021-05-13 18:04:26 +0000 URL: https://git.openjdk.java.net/jdk/commit/853ffdb25c76637555fa732f5e05024243747a70
13-05-2021

Yes, but removing the _suspend_flag is a long term goal that will require more work to switch other operations to use handshakes. That in turn will likely require some further changes like JDK-8238862. This cleanup aims to cleanup what we have today and will facilitate future changes on thread transition code that in turn will help to remove _suspend_flag.
26-04-2021

There's an older bug covering some of this work: JDK-8238861 Remove suspend_flag
26-04-2021