< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
Print this page
rev 54717 : imported patch 8223306
*** 90,112 ****
// Get a hold of the object heap
heap = vm.getObjectHeap();
// Do each thread's roots
! for (JavaThread thread = VM.getVM().getThreads().first();
! thread != null;
! thread = thread.next()) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
thread.printThreadIDOn(new PrintStream(bos));
String threadDesc =
" in thread \"" + thread.getThreadName() +
"\" (id " + bos.toString() + ")";
doStack(thread,
new RootVisitor("Stack root" + threadDesc));
doJNIHandleBlock(thread.activeHandles(),
new RootVisitor("JNI handle root" + threadDesc));
! }
// Do global JNI handles
JNIHandles handles = VM.getVM().getJNIHandles();
doOopStorage(handles.globalHandles(),
new RootVisitor("Global JNI handle root"));
--- 90,110 ----
// Get a hold of the object heap
heap = vm.getObjectHeap();
// Do each thread's roots
! VM.getVM().getThreads().doJavaThreads((thread) -> {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
thread.printThreadIDOn(new PrintStream(bos));
String threadDesc =
" in thread \"" + thread.getThreadName() +
"\" (id " + bos.toString() + ")";
doStack(thread,
new RootVisitor("Stack root" + threadDesc));
doJNIHandleBlock(thread.activeHandles(),
new RootVisitor("JNI handle root" + threadDesc));
! });
// Do global JNI handles
JNIHandles handles = VM.getVM().getJNIHandles();
doOopStorage(handles.globalHandles(),
new RootVisitor("Global JNI handle root"));
< prev index next >