hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 16611 6807a703dd6b
parent 15935 50da9e5eb858
child 16672 152c041083e1
equal deleted inserted replaced
16381:806d87cb0cc7 16611:6807a703dd6b
  2226     }
  2226     }
  2227   }
  2227   }
  2228 }
  2228 }
  2229 
  2229 
  2230 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) {
  2230 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) {
  2231 #ifdef COMPILER2
       
  2232   // Currently only used by C2.
       
  2233   for (int m = 0; m < methods()->length(); m++) {
  2231   for (int m = 0; m < methods()->length(); m++) {
  2234     MethodData* mdo = methods()->at(m)->method_data();
  2232     MethodData* mdo = methods()->at(m)->method_data();
  2235     if (mdo != NULL) {
  2233     if (mdo != NULL) {
  2236       for (ProfileData* data = mdo->first_data();
  2234       for (ProfileData* data = mdo->first_data();
  2237            mdo->is_valid(data);
  2235            mdo->is_valid(data);
  2238            data = mdo->next_data(data)) {
  2236            data = mdo->next_data(data)) {
  2239         data->clean_weak_klass_links(is_alive);
  2237         data->clean_weak_klass_links(is_alive);
  2240       }
  2238       }
  2241     }
  2239     }
  2242   }
  2240   }
  2243 #else
       
  2244 #ifdef ASSERT
       
  2245   // Verify that we haven't started to use MDOs for C1.
       
  2246   for (int m = 0; m < methods()->length(); m++) {
       
  2247     MethodData* mdo = methods()->at(m)->method_data();
       
  2248     assert(mdo == NULL, "Didn't expect C1 to use MDOs");
       
  2249   }
       
  2250 #endif // ASSERT
       
  2251 #endif // !COMPILER2
       
  2252 }
  2241 }
  2253 
  2242 
  2254 
  2243 
  2255 static void remove_unshareable_in_class(Klass* k) {
  2244 static void remove_unshareable_in_class(Klass* k) {
  2256   // remove klass's unshareable info
  2245   // remove klass's unshareable info