2083 ResourceMark rm;
2084
2085 if (!CodeCache::contains(this)) {
2086 fatal("nmethod at " INTPTR_FORMAT " not in zone", p2i(this));
2087 }
2088
2089 if(is_native_method() )
2090 return;
2091
2092 nmethod* nm = CodeCache::find_nmethod(verified_entry_point());
2093 if (nm != this) {
2094 fatal("findNMethod did not find this nmethod (" INTPTR_FORMAT ")", p2i(this));
2095 }
2096
2097 for (PcDesc* p = scopes_pcs_begin(); p < scopes_pcs_end(); p++) {
2098 if (! p->verify(this)) {
2099 tty->print_cr("\t\tin nmethod at " INTPTR_FORMAT " (pcs)", p2i(this));
2100 }
2101 }
2102
2103 VerifyOopsClosure voc(this);
2104 oops_do(&voc);
2105 assert(voc.ok(), "embedded oops must be OK");
2106 Universe::heap()->verify_nmethod(this);
2107
2108 verify_scopes();
2109 }
2110
2111
2112 void nmethod::verify_interrupt_point(address call_site) {
2113 // Verify IC only when nmethod installation is finished.
2114 if (!is_not_installed()) {
2115 Thread *cur = Thread::current();
2116 if (CompiledIC_lock->owner() == cur ||
2117 ((cur->is_VM_thread() || cur->is_ConcurrentGC_thread()) &&
2118 SafepointSynchronize::is_at_safepoint())) {
2119 CompiledIC_at(this, call_site);
2120 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
2121 } else {
2122 MutexLocker ml_verify (CompiledIC_lock);
2123 CompiledIC_at(this, call_site);
2124 }
|
2083 ResourceMark rm;
2084
2085 if (!CodeCache::contains(this)) {
2086 fatal("nmethod at " INTPTR_FORMAT " not in zone", p2i(this));
2087 }
2088
2089 if(is_native_method() )
2090 return;
2091
2092 nmethod* nm = CodeCache::find_nmethod(verified_entry_point());
2093 if (nm != this) {
2094 fatal("findNMethod did not find this nmethod (" INTPTR_FORMAT ")", p2i(this));
2095 }
2096
2097 for (PcDesc* p = scopes_pcs_begin(); p < scopes_pcs_end(); p++) {
2098 if (! p->verify(this)) {
2099 tty->print_cr("\t\tin nmethod at " INTPTR_FORMAT " (pcs)", p2i(this));
2100 }
2101 }
2102
2103 Universe::heap()->verify_nmethod(this);
2104
2105 verify_scopes();
2106 }
2107
2108
2109 void nmethod::verify_interrupt_point(address call_site) {
2110 // Verify IC only when nmethod installation is finished.
2111 if (!is_not_installed()) {
2112 Thread *cur = Thread::current();
2113 if (CompiledIC_lock->owner() == cur ||
2114 ((cur->is_VM_thread() || cur->is_ConcurrentGC_thread()) &&
2115 SafepointSynchronize::is_at_safepoint())) {
2116 CompiledIC_at(this, call_site);
2117 CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
2118 } else {
2119 MutexLocker ml_verify (CompiledIC_lock);
2120 CompiledIC_at(this, call_site);
2121 }
|