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

src/share/vm/opto/bytecodeInfo.cpp

Print this page




  66 
  67 InlineTree::InlineTree(Compile* c, ciMethod* callee_method, JVMState* caller_jvms, float site_invoke_ratio)
  68 : C(c), _caller_jvms(caller_jvms), _caller_tree(NULL),
  69   _method(callee_method), _site_invoke_ratio(site_invoke_ratio),
  70   _count_inline_bcs(method()->code_size()) {
  71   NOT_PRODUCT(_count_inlines = 0;)
  72   assert(!UseOldInlining, "do not use for old stuff");
  73 }
  74 
  75 
  76 
  77 static void print_indent(int depth) {
  78   tty->print("      ");
  79   for (int i = depth; i != 0; --i) tty->print("  ");
  80 }
  81 
  82 static bool is_init_with_ea(ciMethod* callee_method,
  83                             ciMethod* caller_method, Compile* C) {
  84   // True when EA is ON and a java constructor is called or
  85   // a super constructor is called from an inlined java constructor.
  86   return DoEscapeAnalysis && EliminateAllocations &&
  87          ( callee_method->is_initializer() ||
  88            (caller_method->is_initializer() &&
  89             caller_method != C->method() &&
  90             caller_method->holder()->is_subclass_of(callee_method->holder()))
  91          );
  92 }
  93 
  94 // positive filter: should send be inlined?  returns NULL, if yes, or rejection msg
  95 const char* InlineTree::shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const {
  96   // Allows targeted inlining
  97   if(callee_method->should_inline()) {
  98     *wci_result = *(WarmCallInfo::always_hot());
  99     if (PrintInlining && Verbose) {
 100       print_indent(inline_depth());
 101       tty->print_cr("Inlined method is hot: ");
 102     }
 103     return NULL;
 104   }
 105 
 106   // positive filter: should send be inlined?  returns NULL (--> yes)




  66 
  67 InlineTree::InlineTree(Compile* c, ciMethod* callee_method, JVMState* caller_jvms, float site_invoke_ratio)
  68 : C(c), _caller_jvms(caller_jvms), _caller_tree(NULL),
  69   _method(callee_method), _site_invoke_ratio(site_invoke_ratio),
  70   _count_inline_bcs(method()->code_size()) {
  71   NOT_PRODUCT(_count_inlines = 0;)
  72   assert(!UseOldInlining, "do not use for old stuff");
  73 }
  74 
  75 
  76 
  77 static void print_indent(int depth) {
  78   tty->print("      ");
  79   for (int i = depth; i != 0; --i) tty->print("  ");
  80 }
  81 
  82 static bool is_init_with_ea(ciMethod* callee_method,
  83                             ciMethod* caller_method, Compile* C) {
  84   // True when EA is ON and a java constructor is called or
  85   // a super constructor is called from an inlined java constructor.
  86   return C->do_escape_analysis() && EliminateAllocations &&
  87          ( callee_method->is_initializer() ||
  88            (caller_method->is_initializer() &&
  89             caller_method != C->method() &&
  90             caller_method->holder()->is_subclass_of(callee_method->holder()))
  91          );
  92 }
  93 
  94 // positive filter: should send be inlined?  returns NULL, if yes, or rejection msg
  95 const char* InlineTree::shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const {
  96   // Allows targeted inlining
  97   if(callee_method->should_inline()) {
  98     *wci_result = *(WarmCallInfo::always_hot());
  99     if (PrintInlining && Verbose) {
 100       print_indent(inline_depth());
 101       tty->print_cr("Inlined method is hot: ");
 102     }
 103     return NULL;
 104   }
 105 
 106   // positive filter: should send be inlined?  returns NULL (--> yes)


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