< prev index next >

src/hotspot/share/opto/bytecodeInfo.cpp

Print this page

 68   // Update hierarchical counts, count_inline_bcs() and count_inlines()
 69   InlineTree *caller = (InlineTree *)caller_tree;
 70   for( ; caller != nullptr; caller = ((InlineTree *)(caller->caller_tree())) ) {
 71     caller->_count_inline_bcs += count_inline_bcs();
 72     NOT_PRODUCT(caller->_count_inlines++;)
 73   }
 74 }
 75 
 76 /**
 77  *  Return true when EA is ON and a java constructor is called or
 78  *  a super constructor is called from an inlined java constructor.
 79  *  Also return true for boxing methods.
 80  *  Also return true for methods returning Iterator (including Iterable::iterator())
 81  *  that is essential for forall-loops performance.
 82  */
 83 static bool is_init_with_ea(ciMethod* callee_method,
 84                             ciMethod* caller_method, Compile* C) {
 85   if (!C->do_escape_analysis() || !EliminateAllocations) {
 86     return false; // EA is off
 87   }
 88   if (callee_method->is_object_initializer()) {
 89     return true; // constructor
 90   }
 91   if (caller_method->is_object_initializer() &&
 92       caller_method != C->method() &&
 93       caller_method->holder()->is_subclass_of(callee_method->holder())) {
 94     return true; // super constructor is called from inlined constructor
 95   }
 96   if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
 97     return true;
 98   }
 99   ciType *retType = callee_method->signature()->return_type();
100   ciKlass *iter = C->env()->Iterator_klass();
101   if(retType->is_loaded() && iter->is_loaded() && retType->is_subtype_of(iter)) {
102     return true;
103   }
104   return false;
105 }
106 
107 /**
108  *  Force inlining unboxing accessor.
109  */
110 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
111   return C->eliminate_boxing() && callee_method->is_unboxing_method();

 68   // Update hierarchical counts, count_inline_bcs() and count_inlines()
 69   InlineTree *caller = (InlineTree *)caller_tree;
 70   for( ; caller != nullptr; caller = ((InlineTree *)(caller->caller_tree())) ) {
 71     caller->_count_inline_bcs += count_inline_bcs();
 72     NOT_PRODUCT(caller->_count_inlines++;)
 73   }
 74 }
 75 
 76 /**
 77  *  Return true when EA is ON and a java constructor is called or
 78  *  a super constructor is called from an inlined java constructor.
 79  *  Also return true for boxing methods.
 80  *  Also return true for methods returning Iterator (including Iterable::iterator())
 81  *  that is essential for forall-loops performance.
 82  */
 83 static bool is_init_with_ea(ciMethod* callee_method,
 84                             ciMethod* caller_method, Compile* C) {
 85   if (!C->do_escape_analysis() || !EliminateAllocations) {
 86     return false; // EA is off
 87   }
 88   if (callee_method->is_object_constructor()) {
 89     return true; // constructor
 90   }
 91   if ((caller_method->is_object_constructor() || caller_method->is_class_initializer()) &&
 92       caller_method != C->method() &&
 93       caller_method->holder()->is_subclass_of(callee_method->holder())) {
 94     return true; // super constructor is called from inlined constructor
 95   }
 96   if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
 97     return true;
 98   }
 99   ciType *retType = callee_method->signature()->return_type();
100   ciKlass *iter = C->env()->Iterator_klass();
101   if(retType->is_loaded() && iter->is_loaded() && retType->is_subtype_of(iter)) {
102     return true;
103   }
104   return false;
105 }
106 
107 /**
108  *  Force inlining unboxing accessor.
109  */
110 static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
111   return C->eliminate_boxing() && callee_method->is_unboxing_method();
< prev index next >