hotspot/src/share/vm/compiler/compileBroker.cpp
changeset 14816 f2935b95cb54
parent 14588 8ec26d2d9339
child 15207 86fd7c602ddf
child 15201 f3d755b11424
equal deleted inserted replaced
14739:12125dacc077 14816:f2935b95cb54
   267                              methodHandle hot_method,
   267                              methodHandle hot_method,
   268                              int hot_count,
   268                              int hot_count,
   269                              const char* comment,
   269                              const char* comment,
   270                              bool is_blocking) {
   270                              bool is_blocking) {
   271   assert(!_lock->is_locked(), "bad locking");
   271   assert(!_lock->is_locked(), "bad locking");
   272   InstanceKlass* holder = method->method_holder();
       
   273 
   272 
   274   _compile_id = compile_id;
   273   _compile_id = compile_id;
   275   _method = method();
   274   _method = method();
   276   _method_holder = JNIHandles::make_global(
   275   _method_holder = JNIHandles::make_global(method->method_holder()->klass_holder());
   277         holder->is_anonymous() ? holder->java_mirror(): holder->class_loader());
       
   278   _osr_bci = osr_bci;
   276   _osr_bci = osr_bci;
   279   _is_blocking = is_blocking;
   277   _is_blocking = is_blocking;
   280   _comp_level = comp_level;
   278   _comp_level = comp_level;
   281   _num_inlined_bytecodes = 0;
   279   _num_inlined_bytecodes = 0;
   282 
   280 
   296       if (hot_method == method) {
   294       if (hot_method == method) {
   297         _hot_method = _method;
   295         _hot_method = _method;
   298       } else {
   296       } else {
   299         _hot_method = hot_method();
   297         _hot_method = hot_method();
   300         // only add loader or mirror if different from _method_holder
   298         // only add loader or mirror if different from _method_holder
   301         InstanceKlass* hot_holder = hot_method->method_holder();
   299         _hot_method_holder = JNIHandles::make_global(hot_method->method_holder()->klass_holder());
   302         _hot_method_holder = JNIHandles::make_global(
       
   303                hot_holder->is_anonymous() ? hot_holder->java_mirror() :
       
   304                                             hot_holder->class_loader());
       
   305       }
   300       }
   306     }
   301     }
   307   }
   302   }
   308 
   303 
   309   _next = NULL;
   304   _next = NULL;