src/hotspot/share/memory/universe.cpp
changeset 59053 ba6c248cae19
parent 58447 319173c62caa
child 59070 22ee476cc664
equal deleted inserted replaced
59051:f0312c7d5b37 59053:ba6c248cae19
   393     // and we find out if we actually update all the oops correctly.
   393     // and we find out if we actually update all the oops correctly.
   394     // But we can't allocate directly in the old generation,
   394     // But we can't allocate directly in the old generation,
   395     // so we allocate wherever, and hope that the first collection
   395     // so we allocate wherever, and hope that the first collection
   396     // moves these objects to the bottom of the old generation.
   396     // moves these objects to the bottom of the old generation.
   397     // We can allocate directly in the permanent generation, so we do.
   397     // We can allocate directly in the permanent generation, so we do.
   398     int size;
   398     int size = FullGCALotDummies * 2;
   399     if (UseConcMarkSweepGC) {
   399 
   400       log_warning(gc)("Using +FullGCALot with concurrent mark sweep gc will not force all objects to relocate");
       
   401       size = FullGCALotDummies;
       
   402     } else {
       
   403       size = FullGCALotDummies * 2;
       
   404     }
       
   405     objArrayOop    naked_array = oopFactory::new_objArray(SystemDictionary::Object_klass(), size, CHECK);
   400     objArrayOop    naked_array = oopFactory::new_objArray(SystemDictionary::Object_klass(), size, CHECK);
   406     objArrayHandle dummy_array(THREAD, naked_array);
   401     objArrayHandle dummy_array(THREAD, naked_array);
   407     int i = 0;
   402     int i = 0;
   408     while (i < size) {
   403     while (i < size) {
   409         // Allocate dummy in old generation
   404         // Allocate dummy in old generation
  1222     if (_fullgc_alot_dummy_next >= _fullgc_alot_dummy_array->length()) {
  1217     if (_fullgc_alot_dummy_next >= _fullgc_alot_dummy_array->length()) {
  1223       // No more dummies to release, release entire array instead
  1218       // No more dummies to release, release entire array instead
  1224       _fullgc_alot_dummy_array = NULL;
  1219       _fullgc_alot_dummy_array = NULL;
  1225       return false;
  1220       return false;
  1226     }
  1221     }
  1227     if (!UseConcMarkSweepGC) {
  1222 
  1228       // Release dummy at bottom of old generation
  1223     // Release dummy at bottom of old generation
  1229       _fullgc_alot_dummy_array->obj_at_put(_fullgc_alot_dummy_next++, NULL);
  1224     _fullgc_alot_dummy_array->obj_at_put(_fullgc_alot_dummy_next++, NULL);
  1230     }
  1225 
  1231     // Release dummy at bottom of permanent generation
  1226     // Release dummy at bottom of permanent generation
  1232     _fullgc_alot_dummy_array->obj_at_put(_fullgc_alot_dummy_next++, NULL);
  1227     _fullgc_alot_dummy_array->obj_at_put(_fullgc_alot_dummy_next++, NULL);
  1233   }
  1228   }
  1234   return true;
  1229   return true;
  1235 }
  1230 }