mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
7000578: CMS: assert(SafepointSynchronize::is_at_safepoint()) failed: Else races are possible
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
This commit is contained in:
parent
fbe476856f
commit
9af444d011
4 changed files with 5 additions and 1 deletions
|
@ -1093,8 +1093,9 @@ bool CompactibleFreeListSpace::block_is_obj(const HeapWord* p) const {
|
||||||
// perm_gen_verify_bit_map where we store the "deadness" information if
|
// perm_gen_verify_bit_map where we store the "deadness" information if
|
||||||
// we did not sweep the perm gen in the most recent previous GC cycle.
|
// we did not sweep the perm gen in the most recent previous GC cycle.
|
||||||
bool CompactibleFreeListSpace::obj_is_alive(const HeapWord* p) const {
|
bool CompactibleFreeListSpace::obj_is_alive(const HeapWord* p) const {
|
||||||
|
assert(SafepointSynchronize::is_at_safepoint() || !is_init_completed(),
|
||||||
|
"Else races are possible");
|
||||||
assert(block_is_obj(p), "The address should point to an object");
|
assert(block_is_obj(p), "The address should point to an object");
|
||||||
assert(SafepointSynchronize::is_at_safepoint(), "Else races are possible");
|
|
||||||
|
|
||||||
// If we're sweeping, we use object liveness information from the main bit map
|
// If we're sweeping, we use object liveness information from the main bit map
|
||||||
// for both perm gen and old gen.
|
// for both perm gen and old gen.
|
||||||
|
|
|
@ -4454,6 +4454,7 @@ universe.cpp genRemSet.hpp
|
||||||
universe.cpp generation.hpp
|
universe.cpp generation.hpp
|
||||||
universe.cpp handles.inline.hpp
|
universe.cpp handles.inline.hpp
|
||||||
universe.cpp hashtable.inline.hpp
|
universe.cpp hashtable.inline.hpp
|
||||||
|
universe.cpp init.hpp
|
||||||
universe.cpp instanceKlass.hpp
|
universe.cpp instanceKlass.hpp
|
||||||
universe.cpp instanceKlassKlass.hpp
|
universe.cpp instanceKlassKlass.hpp
|
||||||
universe.cpp instanceRefKlass.hpp
|
universe.cpp instanceRefKlass.hpp
|
||||||
|
|
|
@ -945,6 +945,7 @@ void universe2_init() {
|
||||||
extern void initialize_converter_functions();
|
extern void initialize_converter_functions();
|
||||||
|
|
||||||
bool universe_post_init() {
|
bool universe_post_init() {
|
||||||
|
assert(!is_init_completed(), "Error: initialization not yet completed!");
|
||||||
Universe::_fully_initialized = true;
|
Universe::_fully_initialized = true;
|
||||||
EXCEPTION_MARK;
|
EXCEPTION_MARK;
|
||||||
{ ResourceMark rm;
|
{ ResourceMark rm;
|
||||||
|
|
|
@ -160,5 +160,6 @@ bool is_init_completed() {
|
||||||
|
|
||||||
|
|
||||||
void set_init_completed() {
|
void set_init_completed() {
|
||||||
|
assert(Universe::is_fully_initialized(), "Should have completed initialization");
|
||||||
_init_completed = true;
|
_init_completed = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue