src/share/vm/oops/instanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/instanceKlass.cpp

Print this page
rev 5771 : 8031752: Failed speculative optimizations should be reattempted when root of compilation is different
Summary: support for speculative traps that keep track of the root of the compilation in which a trap occurs.
Reviewed-by:


2217     if (ClassUnloading) {
2218       Klass* impl = implementor();
2219       if (impl != NULL) {
2220         if (!impl->is_loader_alive(is_alive)) {
2221           // remove this guy
2222           Klass** klass = adr_implementor();
2223           assert(klass != NULL, "null klass");
2224           if (klass != NULL) {
2225             *klass = NULL;
2226           }
2227         }
2228       }
2229     }
2230   }
2231 }
2232 
2233 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) {
2234   for (int m = 0; m < methods()->length(); m++) {
2235     MethodData* mdo = methods()->at(m)->method_data();
2236     if (mdo != NULL) {
2237       for (ProfileData* data = mdo->first_data();
2238            mdo->is_valid(data);
2239            data = mdo->next_data(data)) {
2240         data->clean_weak_klass_links(is_alive);
2241       }
2242       ParametersTypeData* parameters = mdo->parameters_type_data();
2243       if (parameters != NULL) {
2244         parameters->clean_weak_klass_links(is_alive);
2245       }
2246     }
2247   }
2248 }
2249 
2250 
2251 static void remove_unshareable_in_class(Klass* k) {
2252   // remove klass's unshareable info
2253   k->remove_unshareable_info();
2254 }
2255 
2256 void InstanceKlass::remove_unshareable_info() {
2257   Klass::remove_unshareable_info();
2258   // Unlink the class
2259   if (is_linked()) {
2260     unlink_class();
2261   }
2262   init_implementor();
2263 
2264   constants()->remove_unshareable_info();
2265 




2217     if (ClassUnloading) {
2218       Klass* impl = implementor();
2219       if (impl != NULL) {
2220         if (!impl->is_loader_alive(is_alive)) {
2221           // remove this guy
2222           Klass** klass = adr_implementor();
2223           assert(klass != NULL, "null klass");
2224           if (klass != NULL) {
2225             *klass = NULL;
2226           }
2227         }
2228       }
2229     }
2230   }
2231 }
2232 
2233 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) {
2234   for (int m = 0; m < methods()->length(); m++) {
2235     MethodData* mdo = methods()->at(m)->method_data();
2236     if (mdo != NULL) {
2237       mdo->clean_method_data(is_alive);








2238     }
2239   }
2240 }
2241 
2242 
2243 static void remove_unshareable_in_class(Klass* k) {
2244   // remove klass's unshareable info
2245   k->remove_unshareable_info();
2246 }
2247 
2248 void InstanceKlass::remove_unshareable_info() {
2249   Klass::remove_unshareable_info();
2250   // Unlink the class
2251   if (is_linked()) {
2252     unlink_class();
2253   }
2254   init_implementor();
2255 
2256   constants()->remove_unshareable_info();
2257 


src/share/vm/oops/instanceKlass.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File