< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 47287 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
rev 47288 : sspitsyn, dcubed, eosterlund CR - minor changes prior to OpenJDK review.
rev 47289 : eosterlund, stefank CR - refactor code into threadSMR.cpp and threadSMR.hpp
rev 47290 : eosterlund CR - need more inline fixes.
rev 47291 : eosterlund, stefank CR - more inline and style cleanups
rev 47292 : stefank, coleenp CR - refactor most JavaThreadIterator usage to use JavaThreadIteratorWithHandle.

@@ -1478,16 +1478,15 @@
 void JavaThread::collect_counters(typeArrayOop array) {
   if (JVMCICounterSize > 0) {
     // dcubed - Looks like the Threads_lock is for stable access
     // to _jvmci_old_thread_counters and _jvmci_counters.
     MutexLocker tl(Threads_lock);
-    ThreadsListHandle tlh;
+    JavaThreadIteratorWithHandle jtiwh;
     for (int i = 0; i < array->length(); i++) {
       array->long_at_put(i, _jvmci_old_thread_counters[i]);
     }
-    JavaThreadIterator jti(tlh.list());
-    for (JavaThread* tp = jti.first(); tp != NULL; tp = jti.next()) {
+    for (; JavaThread *tp = jtiwh.next(); ) {
       if (jvmci_counters_include(tp)) {
         for (int i = 0; i < array->length(); i++) {
           array->long_at_put(i, array->long_at(i) + tp->_jvmci_counters[i]);
         }
       }
< prev index next >