8038797: JVMTI FollowReferences does not report roots reachable from nmethods
authorcoleenp
Tue, 23 Aug 2016 13:44:59 -0400
changeset 40662 6e951c9e7318
parent 40659 a2b2936240b9
child 40663 e62e7d68f3d2
8038797: JVMTI FollowReferences does not report roots reachable from nmethods Summary: Also follow nmethods found on the execution stack. Reviewed-by: dlong, mgerdin
hotspot/src/share/vm/prims/jvmtiTagMap.cpp
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Mon Aug 22 15:54:22 2016 +0000
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Tue Aug 23 13:44:59 2016 -0400
@@ -3119,6 +3119,11 @@
             }
           }
 
+          // Follow oops from compiled nmethod
+          if (jvf->cb() != NULL && jvf->cb()->is_nmethod()) {
+            blk->set_context(thread_tag, tid, depth, method);
+            jvf->cb()->as_nmethod()->oops_do(blk);
+          }
         } else {
           blk->set_context(thread_tag, tid, depth, method);
           if (is_top_frame) {