8038797: JVMTI FollowReferences does not report roots reachable from nmethods
Summary: Also follow nmethods found on the execution stack.
Reviewed-by: dlong, mgerdin
--- 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) {