comparison src/share/vm/memory/compactingPermGenGen.cpp @ 1051:26f1542097f1

6801625: CDS: HeapDump tests crash with internal error in compactingPermGenGen.cpp Summary: Allow iteration over the shared spaces when using CDS, repealing previous proscription. Deferred further required CDS-related cleanups of perm gen to CR 6897789. Reviewed-by: phh, jmasa
author ysr
date Tue, 03 Nov 2009 16:43:16 -0800
parents 5251a9cd8eb8
children
comparison
equal deleted inserted replaced
5:b43dd6d57c9c 6:1f9a42cf5958
350 } 350 }
351 #endif 351 #endif
352 } 352 }
353 353
354 354
355 // Do not use in time-critical operations due to the possibility of paging
356 // in otherwise untouched or previously unread portions of the perm gen,
357 // for instance, the shared spaces. NOTE: Because CompactingPermGenGen
358 // derives from OneContigSpaceCardGeneration which is supposed to have a
359 // single space, and does not override its object_iterate() method,
360 // object iteration via that interface does not look at the objects in
361 // the shared spaces when using CDS. This should be fixed; see CR 6897798.
355 void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) { 362 void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) {
356 OneContigSpaceCardGeneration::space_iterate(blk, usedOnly); 363 OneContigSpaceCardGeneration::space_iterate(blk, usedOnly);
357 if (spec()->enable_shared_spaces()) { 364 if (spec()->enable_shared_spaces()) {
358 #ifdef PRODUCT
359 // Making the rw_space walkable will page in the entire space, and 365 // Making the rw_space walkable will page in the entire space, and
360 // is to be avoided. However, this is required for Verify options. 366 // is to be avoided in the case of time-critical operations.
361 ShouldNotReachHere(); 367 // However, this is required for Verify and heap dump operations.
362 #endif
363
364 blk->do_space(ro_space()); 368 blk->do_space(ro_space());
365 blk->do_space(rw_space()); 369 blk->do_space(rw_space());
366 } 370 }
367 } 371 }
368 372