1.1 --- a/src/share/vm/memory/compactingPermGenGen.cpp Fri Oct 30 13:31:11 2009 -0400 1.2 +++ b/src/share/vm/memory/compactingPermGenGen.cpp Tue Nov 03 16:43:16 2009 -0800 1.3 @@ -352,15 +352,19 @@ 1.4 } 1.5 1.6 1.7 +// Do not use in time-critical operations due to the possibility of paging 1.8 +// in otherwise untouched or previously unread portions of the perm gen, 1.9 +// for instance, the shared spaces. NOTE: Because CompactingPermGenGen 1.10 +// derives from OneContigSpaceCardGeneration which is supposed to have a 1.11 +// single space, and does not override its object_iterate() method, 1.12 +// object iteration via that interface does not look at the objects in 1.13 +// the shared spaces when using CDS. This should be fixed; see CR 6897798. 1.14 void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) { 1.15 OneContigSpaceCardGeneration::space_iterate(blk, usedOnly); 1.16 if (spec()->enable_shared_spaces()) { 1.17 -#ifdef PRODUCT 1.18 // Making the rw_space walkable will page in the entire space, and 1.19 - // is to be avoided. However, this is required for Verify options. 1.20 - ShouldNotReachHere(); 1.21 -#endif 1.22 - 1.23 + // is to be avoided in the case of time-critical operations. 1.24 + // However, this is required for Verify and heap dump operations. 1.25 blk->do_space(ro_space()); 1.26 blk->do_space(rw_space()); 1.27 }