JDK-8209976 : Improve iteration over non-JavaThreads
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-08-26
  • Updated: 2020-04-16
  • Resolved: 2018-08-28
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 11 JDK 12
11.0.7Fixed 12 b09Fixed
Related Reports
Blocks :  
Duplicate :  
Relates :  
Description
We sometimes want to iterate over all threads, or all non-JavaThreads, but there is presently no convient collection of the non-JavaThreads.  Instead, Threads::non_java_threads_do obtains some threads from other components, and passes the closure off to still other componets.

JDK-8209850 added a list of NamedThreads and iteration over that list.  However, there are non-JavaThread classes which are not NamedThread, so not included in that list.  It would simplify things if we had a list that included all of the non-JavaThreads.

We could move the outlier Thread classes under NamedThread, but better would be to add a new NonJavaThread class and move the list management and iteration there.

Comments
It applied cleanly now without regressions after pushing JDK-8209850 to 11u-dev.
27-12-2019

Fix request This fix is required by https://bugs.openjdk.java.net/browse/JDK-8225797 backport to JDK 11u. The fix applies with minimal changes - the change is being reviewed in https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-November/002115.html Tests from jdk_tier1, jdk_tier2 and jdk_core are all passing.
16-11-2019