src/hotspot/share/oops/method.cpp
changeset 58668 eda750f21308
parent 58545 725244418646
child 58679 9c3209ff7550
child 58775 ba524a5f7cc2
equal deleted inserted replaced
58664:e3618c902d17 58668:eda750f21308
   116 // Release Method*.  The nmethod will be gone when we get here because
   116 // Release Method*.  The nmethod will be gone when we get here because
   117 // we've walked the code cache.
   117 // we've walked the code cache.
   118 void Method::deallocate_contents(ClassLoaderData* loader_data) {
   118 void Method::deallocate_contents(ClassLoaderData* loader_data) {
   119   MetadataFactory::free_metadata(loader_data, constMethod());
   119   MetadataFactory::free_metadata(loader_data, constMethod());
   120   set_constMethod(NULL);
   120   set_constMethod(NULL);
   121 #if INCLUDE_JVMCI
       
   122   if (method_data()) {
       
   123     FailedSpeculation::free_failed_speculations(method_data()->get_failed_speculations_address());
       
   124   }
       
   125 #endif
       
   126   MetadataFactory::free_metadata(loader_data, method_data());
   121   MetadataFactory::free_metadata(loader_data, method_data());
   127   set_method_data(NULL);
   122   set_method_data(NULL);
   128   MetadataFactory::free_metadata(loader_data, method_counters());
   123   MetadataFactory::free_metadata(loader_data, method_counters());
   129   clear_method_counters();
   124   clear_method_counters();
   130   // The nmethod will be gone when we get here.
   125   // The nmethod will be gone when we get here.
   131   if (code() != NULL) _code = NULL;
   126   if (code() != NULL) _code = NULL;
       
   127 }
       
   128 
       
   129 void Method::release_C_heap_structures() {
       
   130   if (method_data()) {
       
   131 #if INCLUDE_JVMCI
       
   132     FailedSpeculation::free_failed_speculations(method_data()->get_failed_speculations_address());
       
   133 #endif
       
   134     // Destroy MethodData
       
   135     method_data()->~MethodData();
       
   136   }
   132 }
   137 }
   133 
   138 
   134 address Method::get_i2c_entry() {
   139 address Method::get_i2c_entry() {
   135   assert(adapter() != NULL, "must have");
   140   assert(adapter() != NULL, "must have");
   136   return adapter()->get_i2c_entry();
   141   return adapter()->get_i2c_entry();