comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 1959:9eecf81a02fb

7000578: CMS: assert(SafepointSynchronize::is_at_safepoint()) failed: Else races are possible Summary: Weakened assert in onj_is_alive() to allow its use at initialization time when is_at_safepoint() normally reports false; added some related asserts to check order of is_init_completed() after Universe::is_fully_initialized(). Reviewed-by: jcoomes
author ysr
date Tue, 16 Nov 2010 13:58:48 -0800
parents 4df7f8cba524
children f95d63e2154a
comparison
equal deleted inserted replaced
1954:e3e1fb85e50a 1959:9eecf81a02fb
1091 // the main marking bitmap in the sweeping phase or, if it's a permanent 1091 // the main marking bitmap in the sweeping phase or, if it's a permanent
1092 // generation and we're not in the sweeping phase, by checking the 1092 // generation and we're not in the sweeping phase, by checking the
1093 // perm_gen_verify_bit_map where we store the "deadness" information if 1093 // perm_gen_verify_bit_map where we store the "deadness" information if
1094 // we did not sweep the perm gen in the most recent previous GC cycle. 1094 // we did not sweep the perm gen in the most recent previous GC cycle.
1095 bool CompactibleFreeListSpace::obj_is_alive(const HeapWord* p) const { 1095 bool CompactibleFreeListSpace::obj_is_alive(const HeapWord* p) const {
1096 assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
1097 "Else races are possible");
1096 assert(block_is_obj(p), "The address should point to an object"); 1098 assert(block_is_obj(p), "The address should point to an object");
1097 assert(SafepointSynchronize::is_at_safepoint(), "Else races are possible");
1098 1099
1099 // If we're sweeping, we use object liveness information from the main bit map 1100 // If we're sweeping, we use object liveness information from the main bit map
1100 // for both perm gen and old gen. 1101 // for both perm gen and old gen.
1101 // We don't need to lock the bitmap (live_map or dead_map below), because 1102 // We don't need to lock the bitmap (live_map or dead_map below), because
1102 // EITHER we are in the middle of the sweeping phase, and the 1103 // EITHER we are in the middle of the sweeping phase, and the