8129961: SIGSEGV when copying to survivor space

Remove "include_young" parameter from GenCollectedHeap::no_allocs_since_save_marks() since all existing uses pass true to always rescan young gen.

Reviewed-by: jmasa, kbarrett
This commit is contained in:
Eric Caspole 2015-07-13 11:49:23 -04:00
parent ef59ce7332
commit 34bcc977bc
4 changed files with 9 additions and 11 deletions

View File

@ -848,7 +848,7 @@ void EvacuateFollowersClosureGeneral::do_void() {
_gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen,
_scan_cur_or_nonheap,
_scan_older);
} while (!_gch->no_allocs_since_save_marks(true /* include_young */));
} while (!_gch->no_allocs_since_save_marks());
}

View File

@ -96,7 +96,7 @@ EvacuateFollowersClosure(GenCollectedHeap* gch,
void DefNewGeneration::EvacuateFollowersClosure::do_void() {
do {
_gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen, _scan_cur_or_nonheap, _scan_older);
} while (!_gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen));
} while (!_gch->no_allocs_since_save_marks());
}
DefNewGeneration::FastEvacuateFollowersClosure::
@ -112,7 +112,7 @@ FastEvacuateFollowersClosure(GenCollectedHeap* gch,
void DefNewGeneration::FastEvacuateFollowersClosure::do_void() {
do {
_gch->oop_since_save_marks_iterate(GenCollectedHeap::YoungGen, _scan_cur_or_nonheap, _scan_older);
} while (!_gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen));
} while (!_gch->no_allocs_since_save_marks());
guarantee(_gen->promo_failure_scan_is_complete(), "Failed to finish scan");
}
@ -597,7 +597,7 @@ void DefNewGeneration::collect(bool full,
gch->rem_set()->prepare_for_younger_refs_iterate(false);
assert(gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen),
assert(gch->no_allocs_since_save_marks(),
"save marks have not been newly set.");
// Not very pretty.
@ -617,7 +617,7 @@ void DefNewGeneration::collect(bool full,
&fsc_with_no_gc_barrier,
&fsc_with_gc_barrier);
assert(gch->no_allocs_since_save_marks(GenCollectedHeap::YoungGen),
assert(gch->no_allocs_since_save_marks(),
"save marks have not been newly set.");
{

View File

@ -741,11 +741,9 @@ ALL_SINCE_SAVE_MARKS_CLOSURES(GCH_SINCE_SAVE_MARKS_ITERATE_DEFN)
#undef GCH_SINCE_SAVE_MARKS_ITERATE_DEFN
bool GenCollectedHeap::no_allocs_since_save_marks(bool include_young) {
if (include_young && !_young_gen->no_allocs_since_save_marks()) {
return false;
}
return _old_gen->no_allocs_since_save_marks();
bool GenCollectedHeap::no_allocs_since_save_marks() {
return _young_gen->no_allocs_since_save_marks() &&
_old_gen->no_allocs_since_save_marks();
}
bool GenCollectedHeap::supports_inline_contig_alloc() const {

View File

@ -436,7 +436,7 @@ public:
// Returns "true" iff no allocations have occurred since the last
// call to "save_marks".
bool no_allocs_since_save_marks(bool include_young);
bool no_allocs_since_save_marks();
// Returns true if an incremental collection is likely to fail.
// We optionally consult the young gen, if asked to do so;