src/hotspot/share/code/nmethod.cpp
changeset 48858 e50e326a2bfc
parent 48608 1dab70e20292
child 49192 6734eeef4283
equal deleted inserted replaced
48857:23a07b0cf8a6 48858:e50e326a2bfc
   953       case relocInfo::virtual_call_type:
   953       case relocInfo::virtual_call_type:
   954       case relocInfo::opt_virtual_call_type: {
   954       case relocInfo::opt_virtual_call_type: {
   955         CompiledIC *ic = CompiledIC_at(&iter);
   955         CompiledIC *ic = CompiledIC_at(&iter);
   956         // Ok, to lookup references to zombies here
   956         // Ok, to lookup references to zombies here
   957         CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination());
   957         CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination());
       
   958         assert(cb != NULL, "destination not in CodeBlob?");
   958         nmethod* nm = cb->as_nmethod_or_null();
   959         nmethod* nm = cb->as_nmethod_or_null();
   959         if( nm != NULL ) {
   960         if( nm != NULL ) {
   960           // Verify that inline caches pointing to both zombie and not_entrant methods are clean
   961           // Verify that inline caches pointing to both zombie and not_entrant methods are clean
   961           if (!nm->is_in_use() || (nm->method()->code() != nm)) {
   962           if (!nm->is_in_use() || (nm->method()->code() != nm)) {
   962             assert(ic->is_clean(), "IC should be clean");
   963             assert(ic->is_clean(), "IC should be clean");
   965         break;
   966         break;
   966       }
   967       }
   967       case relocInfo::static_call_type: {
   968       case relocInfo::static_call_type: {
   968         CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc());
   969         CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc());
   969         CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination());
   970         CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination());
       
   971         assert(cb != NULL, "destination not in CodeBlob?");
   970         nmethod* nm = cb->as_nmethod_or_null();
   972         nmethod* nm = cb->as_nmethod_or_null();
   971         if( nm != NULL ) {
   973         if( nm != NULL ) {
   972           // Verify that inline caches pointing to both zombie and not_entrant methods are clean
   974           // Verify that inline caches pointing to both zombie and not_entrant methods are clean
   973           if (!nm->is_in_use() || (nm->method()->code() != nm)) {
   975           if (!nm->is_in_use() || (nm->method()->code() != nm)) {
   974             assert(csc->is_clean(), "IC should be clean");
   976             assert(csc->is_clean(), "IC should be clean");
  2730     }
  2732     }
  2731   }
  2733   }
  2732 
  2734 
  2733   virtual void verify_resolve_call(address dest) const {
  2735   virtual void verify_resolve_call(address dest) const {
  2734     CodeBlob* db = CodeCache::find_blob_unsafe(dest);
  2736     CodeBlob* db = CodeCache::find_blob_unsafe(dest);
  2735     assert(!db->is_adapter_blob(), "must use stub!");
  2737     assert(db != NULL && !db->is_adapter_blob(), "must use stub!");
  2736   }
  2738   }
  2737 
  2739 
  2738   virtual bool is_call_to_interpreted(address dest) const {
  2740   virtual bool is_call_to_interpreted(address dest) const {
  2739     CodeBlob* cb = CodeCache::find_blob(_call->instruction_address());
  2741     CodeBlob* cb = CodeCache::find_blob(_call->instruction_address());
  2740     return cb->contains(dest);
  2742     return cb->contains(dest);