< prev index next >

src/hotspot/share/prims/jvmtiTagMap.cpp

Print this page

2289   for (int index = 0; index < values->size(); index++) {
2290     if (values->at(index)->type() == T_OBJECT) {
2291       oop obj = values->obj_at(index)();
2292       if (obj == nullptr) {
2293         continue;
2294       }
2295       // stack reference
2296       if (!CallbackInvoker::report_stack_ref_root(_thread_tag, _tid, _depth, method,
2297                                                   bci, slot_offset + index, obj)) {
2298         return false;
2299       }
2300     }
2301   }
2302   return true;
2303 }
2304 
2305 bool StackRefCollector::report_native_stack_refs(jmethodID method) {
2306   _blk->set_context(_thread_tag, _tid, _depth, method);
2307   if (_is_top_frame) {
2308     // JNI locals for the top frame.
2309     assert(_java_thread != nullptr, "sanity");
2310     _java_thread->active_handles()->oops_do(_blk);
2311     if (_blk->stopped()) {
2312       return false;

2313     }
2314   } else {
2315     if (_last_entry_frame != nullptr) {
2316       // JNI locals for the entry frame.
2317       assert(_last_entry_frame->is_entry_frame(), "checking");
2318       _last_entry_frame->entry_frame_call_wrapper()->handles()->oops_do(_blk);
2319       if (_blk->stopped()) {
2320         return false;
2321       }
2322     }
2323   }
2324   return true;
2325 }
2326 
2327 bool StackRefCollector::do_frame(vframe* vf) {
2328   if (vf->is_java_frame()) {
2329     // java frame (interpreted, compiled, ...)
2330     javaVFrame* jvf = javaVFrame::cast(vf);
2331 
2332     jmethodID method = jvf->method()->jmethod_id();

2289   for (int index = 0; index < values->size(); index++) {
2290     if (values->at(index)->type() == T_OBJECT) {
2291       oop obj = values->obj_at(index)();
2292       if (obj == nullptr) {
2293         continue;
2294       }
2295       // stack reference
2296       if (!CallbackInvoker::report_stack_ref_root(_thread_tag, _tid, _depth, method,
2297                                                   bci, slot_offset + index, obj)) {
2298         return false;
2299       }
2300     }
2301   }
2302   return true;
2303 }
2304 
2305 bool StackRefCollector::report_native_stack_refs(jmethodID method) {
2306   _blk->set_context(_thread_tag, _tid, _depth, method);
2307   if (_is_top_frame) {
2308     // JNI locals for the top frame.
2309     if (_java_thread != nullptr) {
2310       _java_thread->active_handles()->oops_do(_blk);
2311       if (_blk->stopped()) {
2312         return false;
2313       }
2314     }
2315   } else {
2316     if (_last_entry_frame != nullptr) {
2317       // JNI locals for the entry frame.
2318       assert(_last_entry_frame->is_entry_frame(), "checking");
2319       _last_entry_frame->entry_frame_call_wrapper()->handles()->oops_do(_blk);
2320       if (_blk->stopped()) {
2321         return false;
2322       }
2323     }
2324   }
2325   return true;
2326 }
2327 
2328 bool StackRefCollector::do_frame(vframe* vf) {
2329   if (vf->is_java_frame()) {
2330     // java frame (interpreted, compiled, ...)
2331     javaVFrame* jvf = javaVFrame::cast(vf);
2332 
2333     jmethodID method = jvf->method()->jmethod_id();
< prev index next >