< prev index next >

src/hotspot/share/opto/bytecodeInfo.cpp

Print this page




 317       }
 318     }
 319   }
 320 
 321   return false;
 322 }
 323 
 324 bool InlineTree::is_not_reached(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile) {
 325   if (!UseInterpreter) {
 326     return false; // -Xcomp
 327   }
 328   if (profile.count() > 0) {
 329     return false; // reachable according to profile
 330   }
 331   if (!callee_method->was_executed_more_than(0)) {
 332     return true; // callee was never executed
 333   }
 334   if (caller_method->is_not_reached(caller_bci)) {
 335     return true; // call site not resolved
 336   }
 337   if (profile.count() == -1) {
 338     return false; // immature profile; optimistically treat as reached
 339   }
 340   assert(profile.count() == 0, "sanity");
 341 
 342   // Profile info is scarce.
 343   // Try to guess: check if the call site belongs to a start block.
 344   // Call sites in a start block should be reachable if no exception is thrown earlier.
 345   ciMethodBlocks* caller_blocks = caller_method->get_method_blocks();
 346   bool is_start_block = caller_blocks->block_containing(caller_bci)->start_bci() == 0;
 347   if (is_start_block) {
 348     return false; // treat the call reached as part of start block
 349   }
 350   return true; // give up and treat the call site as not reached
 351 }
 352 
 353 //-----------------------------try_to_inline-----------------------------------
 354 // return true if ok
 355 // Relocated from "InliningClosure::try_to_inline"
 356 bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
 357                                int caller_bci, JVMState* jvms, ciCallProfile& profile,
 358                                WarmCallInfo* wci_result, bool& should_delay) {




 317       }
 318     }
 319   }
 320 
 321   return false;
 322 }
 323 
 324 bool InlineTree::is_not_reached(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile) {
 325   if (!UseInterpreter) {
 326     return false; // -Xcomp
 327   }
 328   if (profile.count() > 0) {
 329     return false; // reachable according to profile
 330   }
 331   if (!callee_method->was_executed_more_than(0)) {
 332     return true; // callee was never executed
 333   }
 334   if (caller_method->is_not_reached(caller_bci)) {
 335     return true; // call site not resolved
 336   }
 337   if (profile.count() <= -1) {
 338     return false; // immature or overflowed profile; optimistically treat as reached
 339   }
 340   assert(profile.count() == 0, "sanity");
 341 
 342   // Profile info is scarce.
 343   // Try to guess: check if the call site belongs to a start block.
 344   // Call sites in a start block should be reachable if no exception is thrown earlier.
 345   ciMethodBlocks* caller_blocks = caller_method->get_method_blocks();
 346   bool is_start_block = caller_blocks->block_containing(caller_bci)->start_bci() == 0;
 347   if (is_start_block) {
 348     return false; // treat the call reached as part of start block
 349   }
 350   return true; // give up and treat the call site as not reached
 351 }
 352 
 353 //-----------------------------try_to_inline-----------------------------------
 354 // return true if ok
 355 // Relocated from "InliningClosure::try_to_inline"
 356 bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
 357                                int caller_bci, JVMState* jvms, ciCallProfile& profile,
 358                                WarmCallInfo* wci_result, bool& should_delay) {


< prev index next >