src/share/vm/opto/bytecodeInfo.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6829187 Sdiff src/share/vm/opto

src/share/vm/opto/bytecodeInfo.cpp

Print this page
rev 1082 : [mq]: indy.compiler.patch


 305     return "size > DesiredMethodLimit";
 306   }
 307 
 308   // ok, inline this method
 309   return NULL;
 310 }
 311 
 312 //------------------------------pass_initial_checks----------------------------
 313 bool pass_initial_checks(ciMethod* caller_method, int caller_bci, ciMethod* callee_method) {
 314   ciInstanceKlass *callee_holder = callee_method ? callee_method->holder() : NULL;
 315   // Check if a callee_method was suggested
 316   if( callee_method == NULL )            return false;
 317   // Check if klass of callee_method is loaded
 318   if( !callee_holder->is_loaded() )      return false;
 319   if( !callee_holder->is_initialized() ) return false;
 320   if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) {
 321     // Checks that constant pool's call site has been visited
 322     // stricter than callee_holder->is_initialized()
 323     ciBytecodeStream iter(caller_method);
 324     iter.force_bci(caller_bci);



 325     int index = iter.get_index_int();
 326     if( !caller_method->is_klass_loaded(index, true) ) {
 327       return false;
 328     }
 329     // Try to do constant pool resolution if running Xcomp
 330     Bytecodes::Code call_bc = iter.cur_bc();
 331     if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) {
 332       return false;
 333     }
 334   }

 335   // We will attempt to see if a class/field/etc got properly loaded.  If it
 336   // did not, it may attempt to throw an exception during our probing.  Catch
 337   // and ignore such exceptions and do not attempt to compile the method.
 338   if( callee_method->should_exclude() )  return false;
 339 
 340   return true;
 341 }
 342 
 343 #ifndef PRODUCT
 344 //------------------------------print_inlining---------------------------------
 345 // Really, the failure_msg can be a success message also.
 346 void InlineTree::print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const {
 347   print_indent(inline_depth());
 348   tty->print("@ %d  ", caller_bci);
 349   if( callee_method ) callee_method->print_short_name();
 350   else                tty->print(" callee not monotonic or profiled");
 351   tty->print("  %s", (failure_msg ? failure_msg : "inline"));
 352   if( Verbose && callee_method ) {
 353     const InlineTree *top = this;
 354     while( top->caller_tree() != NULL ) { top = top->caller_tree(); }




 305     return "size > DesiredMethodLimit";
 306   }
 307 
 308   // ok, inline this method
 309   return NULL;
 310 }
 311 
 312 //------------------------------pass_initial_checks----------------------------
 313 bool pass_initial_checks(ciMethod* caller_method, int caller_bci, ciMethod* callee_method) {
 314   ciInstanceKlass *callee_holder = callee_method ? callee_method->holder() : NULL;
 315   // Check if a callee_method was suggested
 316   if( callee_method == NULL )            return false;
 317   // Check if klass of callee_method is loaded
 318   if( !callee_holder->is_loaded() )      return false;
 319   if( !callee_holder->is_initialized() ) return false;
 320   if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) {
 321     // Checks that constant pool's call site has been visited
 322     // stricter than callee_holder->is_initialized()
 323     ciBytecodeStream iter(caller_method);
 324     iter.force_bci(caller_bci);
 325     Bytecodes::Code call_bc = iter.cur_bc();
 326     // An invokedynamic instruction does not have a klass.
 327     if (call_bc != Bytecodes::_invokedynamic) {
 328       int index = iter.get_index_int();
 329       if (!caller_method->is_klass_loaded(index, true)) {
 330         return false;
 331       }
 332       // Try to do constant pool resolution if running Xcomp

 333       if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) {
 334         return false;
 335       }
 336     }
 337   }
 338   // We will attempt to see if a class/field/etc got properly loaded.  If it
 339   // did not, it may attempt to throw an exception during our probing.  Catch
 340   // and ignore such exceptions and do not attempt to compile the method.
 341   if( callee_method->should_exclude() )  return false;
 342 
 343   return true;
 344 }
 345 
 346 #ifndef PRODUCT
 347 //------------------------------print_inlining---------------------------------
 348 // Really, the failure_msg can be a success message also.
 349 void InlineTree::print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const {
 350   print_indent(inline_depth());
 351   tty->print("@ %d  ", caller_bci);
 352   if( callee_method ) callee_method->print_short_name();
 353   else                tty->print(" callee not monotonic or profiled");
 354   tty->print("  %s", (failure_msg ? failure_msg : "inline"));
 355   if( Verbose && callee_method ) {
 356     const InlineTree *top = this;
 357     while( top->caller_tree() != NULL ) { top = top->caller_tree(); }


src/share/vm/opto/bytecodeInfo.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File