6801625: CDS: HeapDump tests crash with internal error in compactingPermGenGen.cpp

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
This commit is contained in:
Y. Srinivas Ramakrishna 2009-11-03 16:43:16 -08:00
parent 56b1d0c435
commit a3e539d0da
3 changed files with 20 additions and 6 deletions

View file

@ -352,15 +352,19 @@ void CompactingPermGenGen::post_compact() {
}
// Do not use in time-critical operations due to the possibility of paging
// in otherwise untouched or previously unread portions of the perm gen,
// for instance, the shared spaces. NOTE: Because CompactingPermGenGen
// derives from OneContigSpaceCardGeneration which is supposed to have a
// single space, and does not override its object_iterate() method,
// object iteration via that interface does not look at the objects in
// the shared spaces when using CDS. This should be fixed; see CR 6897798.
void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) {
OneContigSpaceCardGeneration::space_iterate(blk, usedOnly);
if (spec()->enable_shared_spaces()) {
#ifdef PRODUCT
// Making the rw_space walkable will page in the entire space, and
// is to be avoided. However, this is required for Verify options.
ShouldNotReachHere();
#endif
// is to be avoided in the case of time-critical operations.
// However, this is required for Verify and heap dump operations.
blk->do_space(ro_space());
blk->do_space(rw_space());
}