hotspot/src/share/vm/runtime/compilationPolicy.cpp
changeset 38133 78b95467b9f1
parent 37248 11a660dbbb8e
child 38139 cf6f5c1b7205
equal deleted inserted replaced
38132:ba888a4f352a 38133:78b95467b9f1
   377     target = (uint)( (ProfileMaturityPercentage * CompileThreshold) / 100 );
   377     target = (uint)( (ProfileMaturityPercentage * CompileThreshold) / 100 );
   378   return (current >= initial + target);
   378   return (current >= initial + target);
   379 }
   379 }
   380 
   380 
   381 nmethod* NonTieredCompPolicy::event(const methodHandle& method, const methodHandle& inlinee, int branch_bci,
   381 nmethod* NonTieredCompPolicy::event(const methodHandle& method, const methodHandle& inlinee, int branch_bci,
   382                                     int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread) {
   382                                     int bci, CompLevel comp_level, CompiledMethod* nm, JavaThread* thread) {
   383   assert(comp_level == CompLevel_none, "This should be only called from the interpreter");
   383   assert(comp_level == CompLevel_none, "This should be only called from the interpreter");
   384   NOT_PRODUCT(trace_frequency_counter_overflow(method, branch_bci, bci));
   384   NOT_PRODUCT(trace_frequency_counter_overflow(method, branch_bci, bci));
   385   if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
   385   if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
   386     // If certain JVMTI events (e.g. frame pop event) are requested then the
   386     // If certain JVMTI events (e.g. frame pop event) are requested then the
   387     // thread is forced to remain in interpreted code. This is
   387     // thread is forced to remain in interpreted code. This is
   482   const int hot_count = m->invocation_count();
   482   const int hot_count = m->invocation_count();
   483   reset_counter_for_invocation_event(m);
   483   reset_counter_for_invocation_event(m);
   484   const char* comment = "count";
   484   const char* comment = "count";
   485 
   485 
   486   if (is_compilation_enabled() && can_be_compiled(m, comp_level)) {
   486   if (is_compilation_enabled() && can_be_compiled(m, comp_level)) {
   487     nmethod* nm = m->code();
   487     CompiledMethod* nm = m->code();
   488     if (nm == NULL ) {
   488     if (nm == NULL ) {
   489       CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread);
   489       CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread);
   490     }
   490     }
   491   }
   491   }
   492 }
   492 }
   711   // negative filter: should send NOT be inlined?  returns NULL (--> inline) or rejection msg
   711   // negative filter: should send NOT be inlined?  returns NULL (--> inline) or rejection msg
   712   if (m->is_abstract()) return (_msg = "abstract method");
   712   if (m->is_abstract()) return (_msg = "abstract method");
   713   // note: we allow ik->is_abstract()
   713   // note: we allow ik->is_abstract()
   714   if (!m->method_holder()->is_initialized()) return (_msg = "method holder not initialized");
   714   if (!m->method_holder()->is_initialized()) return (_msg = "method holder not initialized");
   715   if (m->is_native()) return (_msg = "native method");
   715   if (m->is_native()) return (_msg = "native method");
   716   nmethod* m_code = m->code();
   716   CompiledMethod* m_code = m->code();
   717   if (m_code != NULL && m_code->code_size() > InlineSmallCode)
   717   if (m_code != NULL && m_code->code_size() > InlineSmallCode)
   718     return (_msg = "already compiled into a big method");
   718     return (_msg = "already compiled into a big method");
   719 
   719 
   720   // use frequency-based objections only for non-trivial methods
   720   // use frequency-based objections only for non-trivial methods
   721   if (m->code_size() <= MaxTrivialSize) return NULL;
   721   if (m->code_size() <= MaxTrivialSize) return NULL;