8209976: Improve iteration over non-JavaThreads

Add NonJavaThread and move NamedThread iteration to new class.

Reviewed-by: eosterlund, coleenp, rkennke
This commit is contained in:
Kim Barrett 2018-08-28 16:04:54 -04:00
parent 1ddabdf0dc
commit e1059f1301
8 changed files with 107 additions and 121 deletions

View file

@ -71,7 +71,7 @@ void GlobalCounter::write_synchronize() {
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
ctc.do_thread(thread);
}
for (NamedThread::Iterator nti; !nti.end(); nti.step()) {
ctc.do_thread(nti.current());
for (NonJavaThread::Iterator njti; !njti.end(); njti.step()) {
ctc.do_thread(njti.current());
}
}