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

src/share/vm/opto/bytecodeInfo.cpp

Print this page
rev 9032 : 8137167: JEP165: Compiler Control: Implementation task
Summary: Compiler Control JEP
Reviewed-by: roland, twisti


  91     return true; // super constructor is called from inlined constructor
  92   }
  93   if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
  94     return true;
  95   }
  96   return false;
  97 }
  98 
  99 /**
 100  *  Force inlining unboxing accessor.
 101  */
 102 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
 103   return C->eliminate_boxing() && callee_method->is_unboxing_method();
 104 }
 105 
 106 // positive filter: should callee be inlined?
 107 bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
 108                                int caller_bci, ciCallProfile& profile,
 109                                WarmCallInfo* wci_result) {
 110   // Allows targeted inlining
 111   if (callee_method->should_inline()) {
 112     *wci_result = *(WarmCallInfo::always_hot());
 113     if (C->print_inlining() && Verbose) {
 114       CompileTask::print_inline_indent(inline_level());
 115       tty->print_cr("Inlined method is hot: ");
 116     }
 117     set_msg("force inline by CompileCommand");
 118     _forced_inline = true;
 119     return true;
 120   }
 121 
 122   if (callee_method->force_inline()) {
 123       set_msg("force inline by annotation");
 124       _forced_inline = true;
 125       return true;
 126   }
 127 
 128 #ifndef PRODUCT
 129   int inline_depth = inline_level()+1;
 130   if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 131     set_msg("force inline by ciReplay");


 205     fail_msg = "abstract method"; // // note: we allow ik->is_abstract()
 206   } else if (!callee_method->holder()->is_initialized()) {
 207     fail_msg = "method holder not initialized";
 208   } else if ( callee_method->is_native()) {
 209     fail_msg = "native method";
 210   } else if ( callee_method->dont_inline()) {
 211     fail_msg = "don't inline by annotation";
 212   }
 213 
 214   // one more inlining restriction
 215   if (fail_msg == NULL && callee_method->has_unloaded_classes_in_signature()) {
 216     fail_msg = "unloaded signature classes";
 217   }
 218 
 219   if (fail_msg != NULL) {
 220     set_msg(fail_msg);
 221     return true;
 222   }
 223 
 224   // ignore heuristic controls on inlining
 225   if (callee_method->should_inline()) {
 226     set_msg("force inline by CompileCommand");
 227     return false;
 228   }
 229 
 230   if (callee_method->should_not_inline()) {
 231     set_msg("disallowed by CompileCommand");
 232     return true;
 233   }
 234 
 235 #ifndef PRODUCT
 236   int caller_bci = jvms->bci();
 237   int inline_depth = inline_level()+1;
 238   if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 239     set_msg("force inline by ciReplay");
 240     return false;
 241   }
 242 
 243   if (ciReplay::should_not_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 244     set_msg("disallowed by ciReplay");
 245     return true;
 246   }
 247 
 248   if (ciReplay::should_not_inline(callee_method)) {
 249     set_msg("disallowed by ciReplay");
 250     return true;




  91     return true; // super constructor is called from inlined constructor
  92   }
  93   if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
  94     return true;
  95   }
  96   return false;
  97 }
  98 
  99 /**
 100  *  Force inlining unboxing accessor.
 101  */
 102 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
 103   return C->eliminate_boxing() && callee_method->is_unboxing_method();
 104 }
 105 
 106 // positive filter: should callee be inlined?
 107 bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
 108                                int caller_bci, ciCallProfile& profile,
 109                                WarmCallInfo* wci_result) {
 110   // Allows targeted inlining
 111   if (C->directive()->should_inline(callee_method)) {
 112     *wci_result = *(WarmCallInfo::always_hot());
 113     if (C->print_inlining() && Verbose) {
 114       CompileTask::print_inline_indent(inline_level());
 115       tty->print_cr("Inlined method is hot: ");
 116     }
 117     set_msg("force inline by CompileCommand");
 118     _forced_inline = true;
 119     return true;
 120   }
 121 
 122   if (callee_method->force_inline()) {
 123       set_msg("force inline by annotation");
 124       _forced_inline = true;
 125       return true;
 126   }
 127 
 128 #ifndef PRODUCT
 129   int inline_depth = inline_level()+1;
 130   if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 131     set_msg("force inline by ciReplay");


 205     fail_msg = "abstract method"; // // note: we allow ik->is_abstract()
 206   } else if (!callee_method->holder()->is_initialized()) {
 207     fail_msg = "method holder not initialized";
 208   } else if ( callee_method->is_native()) {
 209     fail_msg = "native method";
 210   } else if ( callee_method->dont_inline()) {
 211     fail_msg = "don't inline by annotation";
 212   }
 213 
 214   // one more inlining restriction
 215   if (fail_msg == NULL && callee_method->has_unloaded_classes_in_signature()) {
 216     fail_msg = "unloaded signature classes";
 217   }
 218 
 219   if (fail_msg != NULL) {
 220     set_msg(fail_msg);
 221     return true;
 222   }
 223 
 224   // ignore heuristic controls on inlining
 225   if (C->directive()->should_inline(callee_method)) {
 226     set_msg("force inline by CompileCommand");
 227     return false;
 228   }
 229 
 230   if (C->directive()->should_not_inline(callee_method)) {
 231     set_msg("disallowed by CompileCommand");
 232     return true;
 233   }
 234 
 235 #ifndef PRODUCT
 236   int caller_bci = jvms->bci();
 237   int inline_depth = inline_level()+1;
 238   if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 239     set_msg("force inline by ciReplay");
 240     return false;
 241   }
 242 
 243   if (ciReplay::should_not_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
 244     set_msg("disallowed by ciReplay");
 245     return true;
 246   }
 247 
 248   if (ciReplay::should_not_inline(callee_method)) {
 249     set_msg("disallowed by ciReplay");
 250     return true;


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