585 _method = method; |
585 _method = method; |
586 _entry_bci = InvocationEntryBci; |
586 _entry_bci = InvocationEntryBci; |
587 _osr_link = NULL; |
587 _osr_link = NULL; |
588 _scavenge_root_link = NULL; |
588 _scavenge_root_link = NULL; |
589 _scavenge_root_state = 0; |
589 _scavenge_root_state = 0; |
|
590 _saved_nmethod_link = NULL; |
590 _compiler = NULL; |
591 _compiler = NULL; |
591 // We have no exception handler or deopt handler make the |
592 // We have no exception handler or deopt handler make the |
592 // values something that will never match a pc like the nmethod vtable entry |
593 // values something that will never match a pc like the nmethod vtable entry |
593 _exception_offset = 0; |
594 _exception_offset = 0; |
594 _deoptimize_offset = 0; |
595 _deoptimize_offset = 0; |
1031 // Ok, to lookup references to zombies here |
1032 // Ok, to lookup references to zombies here |
1032 CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination()); |
1033 CodeBlob *cb = CodeCache::find_blob_unsafe(ic->ic_destination()); |
1033 if( cb != NULL && cb->is_nmethod() ) { |
1034 if( cb != NULL && cb->is_nmethod() ) { |
1034 nmethod* nm = (nmethod*)cb; |
1035 nmethod* nm = (nmethod*)cb; |
1035 // Clean inline caches pointing to both zombie and not_entrant methods |
1036 // Clean inline caches pointing to both zombie and not_entrant methods |
1036 if (!nm->is_in_use()) ic->set_to_clean(); |
1037 if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(); |
1037 } |
1038 } |
1038 break; |
1039 break; |
1039 } |
1040 } |
1040 case relocInfo::static_call_type: { |
1041 case relocInfo::static_call_type: { |
1041 CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc()); |
1042 CompiledStaticCall *csc = compiledStaticCall_at(iter.reloc()); |
1042 CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination()); |
1043 CodeBlob *cb = CodeCache::find_blob_unsafe(csc->destination()); |
1043 if( cb != NULL && cb->is_nmethod() ) { |
1044 if( cb != NULL && cb->is_nmethod() ) { |
1044 nmethod* nm = (nmethod*)cb; |
1045 nmethod* nm = (nmethod*)cb; |
1045 // Clean inline caches pointing to both zombie and not_entrant methods |
1046 // Clean inline caches pointing to both zombie and not_entrant methods |
1046 if (!nm->is_in_use()) csc->set_to_clean(); |
1047 if (!nm->is_in_use() || (nm->method()->code() != nm)) csc->set_to_clean(); |
1047 } |
1048 } |
1048 break; |
1049 break; |
1049 } |
1050 } |
1050 } |
1051 } |
1051 } |
1052 } |
1310 check_safepoint(); |
1311 check_safepoint(); |
1311 |
1312 |
1312 // completely deallocate this method |
1313 // completely deallocate this method |
1313 EventMark m("flushing nmethod " INTPTR_FORMAT " %s", this, ""); |
1314 EventMark m("flushing nmethod " INTPTR_FORMAT " %s", this, ""); |
1314 if (PrintMethodFlushing) { |
1315 if (PrintMethodFlushing) { |
1315 tty->print_cr("*flushing nmethod " INTPTR_FORMAT ". Live blobs: %d", this, CodeCache::nof_blobs()); |
1316 tty->print_cr("*flushing nmethod %3d/" INTPTR_FORMAT ". Live blobs:" UINT32_FORMAT "/Free CodeCache:" SIZE_FORMAT "Kb", |
|
1317 _compile_id, this, CodeCache::nof_blobs(), CodeCache::unallocated_capacity()/1024); |
1316 } |
1318 } |
1317 |
1319 |
1318 // We need to deallocate any ExceptionCache data. |
1320 // We need to deallocate any ExceptionCache data. |
1319 // Note that we do not need to grab the nmethod lock for this, it |
1321 // Note that we do not need to grab the nmethod lock for this, it |
1320 // better be thread safe if we're disposing of it! |
1322 // better be thread safe if we're disposing of it! |