comparison src/share/vm/prims/jvmtiRedefineClasses.cpp @ 2226:c5a923563727

6912621: iCMS: Error: assert(_markBitMap.isMarked(addr + 1),"Missing Printezis bit?") Summary: Fix block_size_if_printezis_bits() so it does not expect the bits, only uses them when available. Fix block_size_no_stall() so it does not stall when the bits are missing such cases, letting the caller deal with zero size returns. Constant pool cache oops do not need to be unparsable or conc_unsafe after their klass pointer is installed. Some cosmetic clean-ups and some assertion checking for conc-usafety which, in the presence of class file redefinition, has no a-priori time boundedness, so all GCs must be able to safely deal with putatively conc-unsafe objects in a stop-world pause. Reviewed-by: jmasa, johnc
author ysr
date Mon, 07 Feb 2011 22:19:57 -0800
parents 3582bf76420e
children fbbeec6dad2d
comparison
equal deleted inserted replaced
2225:c798c277ddd1 2226:c5a923563727
1245 constantPoolHandle scratch_cp(THREAD, scratch_class->constants()); 1245 constantPoolHandle scratch_cp(THREAD, scratch_class->constants());
1246 1246
1247 // Constant pools are not easily reused so we allocate a new one 1247 // Constant pools are not easily reused so we allocate a new one
1248 // each time. 1248 // each time.
1249 // merge_cp is created unsafe for concurrent GC processing. It 1249 // merge_cp is created unsafe for concurrent GC processing. It
1250 // should be marked safe before discarding it because, even if 1250 // should be marked safe before discarding it. Even though
1251 // garbage. If it crosses a card boundary, it may be scanned 1251 // garbage, if it crosses a card boundary, it may be scanned
1252 // in order to find the start of the first complete object on the card. 1252 // in order to find the start of the first complete object on the card.
1253 constantPoolHandle merge_cp(THREAD, 1253 constantPoolHandle merge_cp(THREAD,
1254 oopFactory::new_constantPool(merge_cp_length, 1254 oopFactory::new_constantPool(merge_cp_length,
1255 methodOopDesc::IsUnsafeConc, 1255 oopDesc::IsUnsafeConc,
1256 THREAD)); 1256 THREAD));
1257 int orig_length = old_cp->orig_length(); 1257 int orig_length = old_cp->orig_length();
1258 if (orig_length == 0) { 1258 if (orig_length == 0) {
1259 // This old_cp is an actual original constant pool. We save 1259 // This old_cp is an actual original constant pool. We save
1260 // the original length in the merged constant pool so that 1260 // the original length in the merged constant pool so that
2341 // scratch_cp is a merged constant pool and has enough space for a 2341 // scratch_cp is a merged constant pool and has enough space for a
2342 // worst case merge situation. We want to associate the minimum 2342 // worst case merge situation. We want to associate the minimum
2343 // sized constant pool with the klass to save space. 2343 // sized constant pool with the klass to save space.
2344 constantPoolHandle smaller_cp(THREAD, 2344 constantPoolHandle smaller_cp(THREAD,
2345 oopFactory::new_constantPool(scratch_cp_length, 2345 oopFactory::new_constantPool(scratch_cp_length,
2346 methodOopDesc::IsUnsafeConc, 2346 oopDesc::IsUnsafeConc,
2347 THREAD)); 2347 THREAD));
2348 // preserve orig_length() value in the smaller copy 2348 // preserve orig_length() value in the smaller copy
2349 int orig_length = scratch_cp->orig_length(); 2349 int orig_length = scratch_cp->orig_length();
2350 assert(orig_length != 0, "sanity check"); 2350 assert(orig_length != 0, "sanity check");
2351 smaller_cp->set_orig_length(orig_length); 2351 smaller_cp->set_orig_length(orig_length);