< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page

364     return;
365   }
366 
367   // handle the case of an anchor explicitly set in continuation code that doesn't have a callee
368   JavaThread* thread = reg_map->thread();
369   if (thread->has_last_Java_frame() && fr.sp() == thread->last_Java_sp()) {
370     return;
371   }
372 
373   if (!method()->is_native()) {
374     address pc = fr.pc();
375     bool has_receiver, has_appendix;
376     Symbol* signature;
377 
378     // The method attached by JIT-compilers should be used, if present.
379     // Bytecode can be inaccurate in such case.
380     Method* callee = attached_method_before_pc(pc);
381     if (callee != nullptr) {
382       has_receiver = !(callee->access_flags().is_static());
383       has_appendix = false;
384       signature    = callee->signature();











385     } else {
386       SimpleScopeDesc ssd(this, pc);
387 
388       Bytecode_invoke call(methodHandle(Thread::current(), ssd.method()), ssd.bci());
389       has_receiver = call.has_receiver();
390       has_appendix = call.has_appendix();
391       signature    = call.signature();
392     }
393 
394     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
395   } else if (method()->is_continuation_enter_intrinsic()) {
396     // This method only calls Continuation.enter()
397     Symbol* signature = vmSymbols::continuationEnter_signature();
398     fr.oops_compiled_arguments_do(signature, false, false, reg_map, f);
399   }
400 }
401 
402 Method* CompiledMethod::attached_method(address call_instr) {
403   assert(code_contains(call_instr), "not part of the nmethod");
404   RelocIterator iter(this, call_instr, call_instr + 1);

364     return;
365   }
366 
367   // handle the case of an anchor explicitly set in continuation code that doesn't have a callee
368   JavaThread* thread = reg_map->thread();
369   if (thread->has_last_Java_frame() && fr.sp() == thread->last_Java_sp()) {
370     return;
371   }
372 
373   if (!method()->is_native()) {
374     address pc = fr.pc();
375     bool has_receiver, has_appendix;
376     Symbol* signature;
377 
378     // The method attached by JIT-compilers should be used, if present.
379     // Bytecode can be inaccurate in such case.
380     Method* callee = attached_method_before_pc(pc);
381     if (callee != nullptr) {
382       has_receiver = !(callee->access_flags().is_static());
383       has_appendix = false;
384       signature = callee->signature();
385 
386       // If inline types are passed as fields, use the extended signature
387       // which contains the types of all (oop) fields of the inline type.
388       if (is_compiled_by_c2() && callee->has_scalarized_args()) {
389         const GrowableArray<SigEntry>* sig = callee->adapter()->get_sig_cc();
390         assert(sig != nullptr, "sig should never be null");
391         TempNewSymbol tmp_sig = SigEntry::create_symbol(sig);
392         has_receiver = false; // The extended signature contains the receiver type
393         fr.oops_compiled_arguments_do(tmp_sig, has_receiver, has_appendix, reg_map, f);
394         return;
395       }
396     } else {
397       SimpleScopeDesc ssd(this, pc);
398 
399       Bytecode_invoke call(methodHandle(Thread::current(), ssd.method()), ssd.bci());
400       has_receiver = call.has_receiver();
401       has_appendix = call.has_appendix();
402       signature    = call.signature();
403     }
404 
405     fr.oops_compiled_arguments_do(signature, has_receiver, has_appendix, reg_map, f);
406   } else if (method()->is_continuation_enter_intrinsic()) {
407     // This method only calls Continuation.enter()
408     Symbol* signature = vmSymbols::continuationEnter_signature();
409     fr.oops_compiled_arguments_do(signature, false, false, reg_map, f);
410   }
411 }
412 
413 Method* CompiledMethod::attached_method(address call_instr) {
414   assert(code_contains(call_instr), "not part of the nmethod");
415   RelocIterator iter(this, call_instr, call_instr + 1);
< prev index next >