1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Tue Nov 02 16:02:46 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Fri Nov 05 13:20:37 2010 -0700 1.3 @@ -1093,7 +1093,8 @@ 1.4 // perm_gen_verify_bit_map where we store the "deadness" information if 1.5 // we did not sweep the perm gen in the most recent previous GC cycle. 1.6 bool CompactibleFreeListSpace::obj_is_alive(const HeapWord* p) const { 1.7 - assert (block_is_obj(p), "The address should point to an object"); 1.8 + assert(block_is_obj(p), "The address should point to an object"); 1.9 + assert(SafepointSynchronize::is_at_safepoint(), "Else races are possible"); 1.10 1.11 // If we're sweeping, we use object liveness information from the main bit map 1.12 // for both perm gen and old gen. 1.13 @@ -1102,9 +1103,14 @@ 1.14 // main marking bit map (live_map below) is locked, 1.15 // OR we're in other phases and perm_gen_verify_bit_map (dead_map below) 1.16 // is stable, because it's mutated only in the sweeping phase. 1.17 + // NOTE: This method is also used by jmap where, if class unloading is 1.18 + // off, the results can return "false" for legitimate perm objects, 1.19 + // when we are not in the midst of a sweeping phase, which can result 1.20 + // in jmap not reporting certain perm gen objects. This will be moot 1.21 + // if/when the perm gen goes away in the future. 1.22 if (_collector->abstract_state() == CMSCollector::Sweeping) { 1.23 CMSBitMap* live_map = _collector->markBitMap(); 1.24 - return live_map->isMarked((HeapWord*) p); 1.25 + return live_map->par_isMarked((HeapWord*) p); 1.26 } else { 1.27 // If we're not currently sweeping and we haven't swept the perm gen in 1.28 // the previous concurrent cycle then we may have dead but unswept objects