8239354: Shenandoah: minor enhancements to traversal GC

Reviewed-by: rkennke
This commit is contained in:
Zhengyu Gu 2020-02-27 12:17:31 -05:00
parent 882633a738
commit efdc0037b8
2 changed files with 6 additions and 2 deletions

View File

@ -248,6 +248,7 @@ inline oop ShenandoahHeap::evacuate_object(oop p, Thread* thread) {
}
assert(ShenandoahThreadLocalData::is_evac_allowed(thread), "must be enclosed in oom-evac scope");
assert(is_concurrent_traversal_in_progress() || !is_traversal_mode(), "Should not evacuate objects");
size_t size = p->size();

View File

@ -571,8 +571,6 @@ void ShenandoahTraversalGC::concurrent_traversal_collection() {
}
void ShenandoahTraversalGC::final_traversal_collection() {
_heap->make_parsable(true);
if (!_heap->cancelled_gc()) {
#if COMPILER2_OR_JVMCI
DerivedPointerTable::clear();
@ -606,6 +604,11 @@ void ShenandoahTraversalGC::final_traversal_collection() {
_heap->set_concurrent_traversal_in_progress(false);
_heap->mark_complete_marking_context();
// A rare case, TLAB/GCLAB is initialized from an empty region without
// any live data, the region can be trashed and may be uncommitted in later code,
// that results the TLAB/GCLAB not usable. Retire them here.
_heap->make_parsable(true);
_heap->parallel_cleaning(false);
fixup_roots();