< prev index next >

src/hotspot/share/opto/bytecodeInfo.cpp

Print this page

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

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