src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java Sat Jan 13 02:56:22 2018 +0100
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/ReversePtrsAnalysis.java Tue Nov 21 09:47:55 2017 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -108,10 +108,10 @@
// Do global JNI handles
JNIHandles handles = VM.getVM().getJNIHandles();
- doJNIHandleBlock(handles.globalHandles(),
- new RootVisitor("Global JNI handle root"));
- doJNIHandleBlock(handles.weakGlobalHandles(),
- new RootVisitor("Weak global JNI handle root"));
+ doOopStorage(handles.globalHandles(),
+ new RootVisitor("Global JNI handle root"));
+ doOopStorage(handles.weakGlobalHandles(),
+ new RootVisitor("Weak global JNI handle root"));
// Do Java-level static fields
ClassLoaderDataGraph cldg = VM.getVM().getClassLoaderDataGraph();
@@ -306,4 +306,9 @@
private void doJNIHandleBlock(JNIHandleBlock handles, AddressVisitor oopVisitor) {
handles.oopsDo(oopVisitor);
}
+
+ // Traverse jobjects in global JNIHandles
+ private void doOopStorage(OopStorage oopSet, AddressVisitor oopVisitor) {
+ oopSet.oopsDo(oopVisitor);
+ }
}