changeset 54955 | 46409371a691 |
parent 53912 | 91f06b86c0da |
child 55647 | f60890de1dfb |
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java Tue May 21 00:52:04 2019 -0700 +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java Tue May 21 10:34:57 2019 +0200 @@ -708,8 +708,8 @@ int frameSerialNum = 0; int numThreads = 0; Threads threads = VM.getVM().getThreads(); - - for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) { + for (int i = 0; i < threads.getNumberOfThreads(); i++) { + JavaThread thread = threads.getJavaThreadAt(i); Oop threadObj = thread.getThreadObj(); if (threadObj != null && !thread.isExiting() && !thread.isHiddenFromExternalView()) {