JDK-8288497 : add support for JavaThread::is_oop_safe()
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,19
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-06-15
  • Updated: 2023-08-30
  • Resolved: 2022-06-21
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 19 JDK 20
19 b28Fixed 20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The JavaThread::_terminated field exists for tracking a JavaThread's
journey thru the thread exit process. The detaching of the GC barrier
from a JavaThread during the exit process is turning out to be an
important state change that needs visibility in order to have correctly
functioning code. Adding JavaThread::is_oop_safe() and
the necessary associated infrastructure provides this visibility.

This comment change from class JavaThread:

@@ -914,7 +915,7 @@ class JavaThread: public Thread {
  private:
   // In general a JavaThread's _terminated field transitions as follows:
   //
-  //   _not_terminated => _thread_exiting => _thread_terminated
+  //   _not_terminated => _thread_exiting => _thread_gc_barrier_detached => _thread_terminated

shows where the new _thread_gc_barrier_detached value
fits into the _terminated field transitions.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1514 Date: 2023-06-29 16:59:01 +0000
29-06-2023

Changeset: e26d3b3c Author: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2022-06-21 16:08:09 +0000 URL: https://git.openjdk.org/jdk19/commit/e26d3b3c01a06f250344d0afdaa9fadd1fdae33b
21-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk19/pull/20 Date: 2022-06-15 15:44:21 +0000
15-06-2022