changeset 11863:ff4b74f6fa40

8038797: JVMTI FollowReferences does not report roots reachable from nmethods Summary: Also follow nmethods found on the execution stack. Reviewed-by: dlong, mgerdin
author coleenp
date Tue, 23 Aug 2016 13:44:59 -0400
parents 8c8e9b96bd7c
children b6e25862a8d2
files src/share/vm/prims/jvmtiTagMap.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiTagMap.cpp	Mon Aug 22 15:54:22 2016 +0000
+++ b/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) {