3002 return false;
3003 }
3004
3005 // Inflated monitors
3006 blk.set_kind(JVMTI_HEAP_REFERENCE_MONITOR);
3007 ObjectSynchronizer::oops_do(&blk);
3008 if (blk.stopped()) {
3009 return false;
3010 }
3011
3012 // threads are now handled in collect_stack_roots()
3013
3014 // Other kinds of roots maintained by HotSpot
3015 // Many of these won't be visible but others (such as instances of important
3016 // exceptions) will be visible.
3017 blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
3018 Universe::oops_do(&blk);
3019
3020 // If there are any non-perm roots in the code cache, visit them.
3021 blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
3022 CodeBlobToOopClosure look_in_blobs(&blk, false);
3023 CodeCache::scavenge_root_nmethods_do(&look_in_blobs);
3024
3025 return true;
3026 }
3027
3028 // Walk the stack of a given thread and find all references (locals
3029 // and JNI calls) and report these as stack references
3030 inline bool VM_HeapWalkOperation::collect_stack_roots(JavaThread* java_thread,
3031 JNILocalRootsClosure* blk)
3032 {
3033 oop threadObj = java_thread->threadObj();
3034 assert(threadObj != NULL, "sanity check");
3035
3036 // only need to get the thread's tag once per thread
3037 jlong thread_tag = tag_for(_tag_map, threadObj);
3038
3039 // also need the thread id
3040 jlong tid = java_lang_Thread::thread_id(threadObj);
3041
3042
|
3002 return false;
3003 }
3004
3005 // Inflated monitors
3006 blk.set_kind(JVMTI_HEAP_REFERENCE_MONITOR);
3007 ObjectSynchronizer::oops_do(&blk);
3008 if (blk.stopped()) {
3009 return false;
3010 }
3011
3012 // threads are now handled in collect_stack_roots()
3013
3014 // Other kinds of roots maintained by HotSpot
3015 // Many of these won't be visible but others (such as instances of important
3016 // exceptions) will be visible.
3017 blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
3018 Universe::oops_do(&blk);
3019
3020 // If there are any non-perm roots in the code cache, visit them.
3021 blk.set_kind(JVMTI_HEAP_REFERENCE_OTHER);
3022 CodeBlobToOopClosure look_in_blobs(&blk, !CodeBlobToOopClosure::FixRelocations);
3023 CodeCache::scavenge_root_nmethods_do(&look_in_blobs);
3024
3025 return true;
3026 }
3027
3028 // Walk the stack of a given thread and find all references (locals
3029 // and JNI calls) and report these as stack references
3030 inline bool VM_HeapWalkOperation::collect_stack_roots(JavaThread* java_thread,
3031 JNILocalRootsClosure* blk)
3032 {
3033 oop threadObj = java_thread->threadObj();
3034 assert(threadObj != NULL, "sanity check");
3035
3036 // only need to get the thread's tag once per thread
3037 jlong thread_tag = tag_for(_tag_map, threadObj);
3038
3039 // also need the thread id
3040 jlong tid = java_lang_Thread::thread_id(threadObj);
3041
3042
|