src/share/vm/c1/c1_LIRAssembler.cpp

Print this page
rev 2893 : 7121756: Improve C1 inlining policy by using profiling at call sites
Summary: profile based recompilation of methods with C1 with more inlining.
Reviewed-by:


 426 }
 427 
 428 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
 429   DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo);
 430   emit_code_stub(stub);
 431 }
 432 
 433 void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) {
 434   rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info());
 435 }
 436 
 437 
 438 void LIR_Assembler::emit_call(LIR_OpJavaCall* op) {
 439   verify_oop_map(op->info());
 440 
 441   if (os::is_MP()) {
 442     // must align calls sites, otherwise they can't be updated atomically on MP hardware
 443     align_call(op->code());
 444   }
 445 

 446   // emit the static call stub stuff out of line
 447   emit_static_call_stub();










 448 
 449   switch (op->code()) {
 450   case lir_static_call:
 451     call(op, relocInfo::static_call_type);
 452     break;
 453   case lir_optvirtual_call:
 454   case lir_dynamic_call:
 455     call(op, relocInfo::opt_virtual_call_type);
 456     break;
 457   case lir_icvirtual_call:
 458     ic_call(op);
 459     break;
 460   case lir_virtual_call:
 461     vtable_call(op);
 462     break;
 463   default: ShouldNotReachHere();
 464   }
 465 
 466   // JSR 292
 467   // Record if this method has MethodHandle invokes.




 426 }
 427 
 428 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
 429   DivByZeroStub* stub = new DivByZeroStub(pc_offset, cinfo);
 430   emit_code_stub(stub);
 431 }
 432 
 433 void LIR_Assembler::emit_rtcall(LIR_OpRTCall* op) {
 434   rt_call(op->result_opr(), op->addr(), op->arguments(), op->tmp(), op->info());
 435 }
 436 
 437 
 438 void LIR_Assembler::emit_call(LIR_OpJavaCall* op) {
 439   verify_oop_map(op->info());
 440 
 441   if (os::is_MP()) {
 442     // must align calls sites, otherwise they can't be updated atomically on MP hardware
 443     align_call(op->code());
 444   }
 445 
 446   if (op->code() != lir_icvirtual_call) {
 447     // emit the static call stub stuff out of line
 448     emit_static_call_stub();
 449   }
 450 
 451   address profile_dest = NULL;
 452   // emit the profile call stub right behind the static call stub
 453   if (op->info()->is_profiled_call() && (op->code() == lir_static_call || op->code() == lir_optvirtual_call)) {
 454     profile_dest = op->code() == lir_static_call ? SharedRuntime::get_resolve_static_profile_call_stub() : SharedRuntime::get_resolve_profile_call_stub();
 455   }
 456   if (profile_dest) {
 457     emit_profile_call_stub(op->info()->method(), op->info()->stack()->bci(), profile_dest);
 458   }
 459 
 460   switch (op->code()) {
 461   case lir_static_call:
 462     call(op, relocInfo::static_call_type);
 463     break;
 464   case lir_optvirtual_call:
 465   case lir_dynamic_call:
 466     call(op, relocInfo::opt_virtual_call_type);
 467     break;
 468   case lir_icvirtual_call:
 469     ic_call(op);
 470     break;
 471   case lir_virtual_call:
 472     vtable_call(op);
 473     break;
 474   default: ShouldNotReachHere();
 475   }
 476 
 477   // JSR 292
 478   // Record if this method has MethodHandle invokes.