src/share/vm/interpreter/linkResolver.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/interpreter

src/share/vm/interpreter/linkResolver.cpp

Print this page
rev 10841 : 8153013: BlockingCompilation test times out
Summary: Task has no invocation count and get stale at once
Reviewed-by: kvn, iveresov, twisti


 132 
 133     // Note: with several active threads, the must_be_compiled may be true
 134     //       while can_be_compiled is false; remove assert
 135     // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile");
 136     if (!THREAD->can_call_java()) {
 137       // don't force compilation, resolve was on behalf of compiler
 138       return;
 139     }
 140     if (selected_method->method_holder()->is_not_initialized()) {
 141       // 'is_not_initialized' means not only '!is_initialized', but also that
 142       // initialization has not been started yet ('!being_initialized')
 143       // Do not force compilation of methods in uninitialized classes.
 144       // Note that doing this would throw an assert later,
 145       // in CompileBroker::compile_method.
 146       // We sometimes use the link resolver to do reflective lookups
 147       // even before classes are initialized.
 148       return;
 149     }
 150     CompileBroker::compile_method(selected_method, InvocationEntryBci,
 151                                   CompilationPolicy::policy()->initial_compile_level(),
 152                                   methodHandle(), 0, "must_be_compiled", CHECK);
 153   }
 154 }
 155 
 156 // utility query for unreflecting a method
 157 CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass) {
 158   Klass* resolved_method_holder = resolved_method->method_holder();
 159   if (resolved_klass == NULL) { // 2nd argument defaults to holder of 1st
 160     resolved_klass = resolved_method_holder;
 161   }
 162   _resolved_klass  = resolved_klass;
 163   _selected_klass  = resolved_klass;
 164   _resolved_method = resolved_method;
 165   _selected_method = resolved_method;
 166   // classify:
 167   CallKind kind = CallInfo::unknown_kind;
 168   int index = resolved_method->vtable_index();
 169   if (resolved_method->can_be_statically_bound()) {
 170     kind = CallInfo::direct_call;
 171   } else if (!resolved_method_holder->is_interface()) {
 172     // Could be an Object method inherited into an interface, but still a vtable call.




 132 
 133     // Note: with several active threads, the must_be_compiled may be true
 134     //       while can_be_compiled is false; remove assert
 135     // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile");
 136     if (!THREAD->can_call_java()) {
 137       // don't force compilation, resolve was on behalf of compiler
 138       return;
 139     }
 140     if (selected_method->method_holder()->is_not_initialized()) {
 141       // 'is_not_initialized' means not only '!is_initialized', but also that
 142       // initialization has not been started yet ('!being_initialized')
 143       // Do not force compilation of methods in uninitialized classes.
 144       // Note that doing this would throw an assert later,
 145       // in CompileBroker::compile_method.
 146       // We sometimes use the link resolver to do reflective lookups
 147       // even before classes are initialized.
 148       return;
 149     }
 150     CompileBroker::compile_method(selected_method, InvocationEntryBci,
 151                                   CompilationPolicy::policy()->initial_compile_level(),
 152                                   methodHandle(), 0, CompileTask::Reason_MustBeCompiled, CHECK);
 153   }
 154 }
 155 
 156 // utility query for unreflecting a method
 157 CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass) {
 158   Klass* resolved_method_holder = resolved_method->method_holder();
 159   if (resolved_klass == NULL) { // 2nd argument defaults to holder of 1st
 160     resolved_klass = resolved_method_holder;
 161   }
 162   _resolved_klass  = resolved_klass;
 163   _selected_klass  = resolved_klass;
 164   _resolved_method = resolved_method;
 165   _selected_method = resolved_method;
 166   // classify:
 167   CallKind kind = CallInfo::unknown_kind;
 168   int index = resolved_method->vtable_index();
 169   if (resolved_method->can_be_statically_bound()) {
 170     kind = CallInfo::direct_call;
 171   } else if (!resolved_method_holder->is_interface()) {
 172     // Could be an Object method inherited into an interface, but still a vtable call.


src/share/vm/interpreter/linkResolver.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File