< prev index next >

src/hotspot/share/opto/bytecodeInfo.cpp

Print this page

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

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