src/hotspot/share/code/nmethod.cpp
changeset 58358 d658f4379c63
parent 58226 408c445d04e8
child 58377 975f2d30f6b3
equal deleted inserted replaced
58356:feff88c68082 58358:d658f4379c63
  2190     }
  2190     }
  2191   }
  2191   }
  2192   virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
  2192   virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
  2193 };
  2193 };
  2194 
  2194 
       
  2195 class VerifyMetadataClosure: public MetadataClosure {
       
  2196  public:
       
  2197   void do_metadata(Metadata* md) {
       
  2198     if (md->is_method()) {
       
  2199       Method* method = (Method*)md;
       
  2200       assert(!method->is_old(), "Should not be installing old methods");
       
  2201     }
       
  2202   }
       
  2203 };
       
  2204 
       
  2205 
  2195 void nmethod::verify() {
  2206 void nmethod::verify() {
  2196 
  2207 
  2197   // Hmm. OSR methods can be deopted but not marked as zombie or not_entrant
  2208   // Hmm. OSR methods can be deopted but not marked as zombie or not_entrant
  2198   // seems odd.
  2209   // seems odd.
  2199 
  2210 
  2253   oops_do(&voc);
  2264   oops_do(&voc);
  2254   assert(voc.ok(), "embedded oops must be OK");
  2265   assert(voc.ok(), "embedded oops must be OK");
  2255   Universe::heap()->verify_nmethod(this);
  2266   Universe::heap()->verify_nmethod(this);
  2256 
  2267 
  2257   verify_scopes();
  2268   verify_scopes();
       
  2269 
       
  2270   CompiledICLocker nm_verify(this);
       
  2271   VerifyMetadataClosure vmc;
       
  2272   metadata_do(&vmc);
  2258 }
  2273 }
  2259 
  2274 
  2260 
  2275 
  2261 void nmethod::verify_interrupt_point(address call_site) {
  2276 void nmethod::verify_interrupt_point(address call_site) {
  2262   // Verify IC only when nmethod installation is finished.
  2277   // Verify IC only when nmethod installation is finished.