RFR: 8209976: Improve iteration over non-JavaThreads

Kim Barrett kim.barrett at oracle.com
Sun Aug 26 23:09:29 UTC 2018


Please review this change to improve the iteration over
non-JavaThreads.  This change introduces a new base class
NonJavaThread, which should be a base for any Thread class that isn't
a JavaThread.  The recently introduced iteration over NamedThreads
(JDK-8209850) is moved to this new class.  This allows the
re-implementation of Threads::non_java_threads_do using that list.

Note: Perhaps CollectedHeap::gc_threads_do could be replaced by a
Threads::gc_threads_do that is implemented as an iteration over the
non-JavaThreads with a filter to select GC-related thread types.  That
isn't being done as part of this change though.

CR:
https://bugs.openjdk.java.net/browse/JDK-8209850

Webrev:
http://cr.openjdk.java.net/~kbarrett/8209976/open.00/

Testing:
mach5 tier1-3, hs-tier4-5 in conjunction with a fix for JDK-8209975.
Local testing of just this change.



More information about the hotspot-dev mailing list