Skip to content
Permalink
Browse files

8231999: Shenandoah: Traversal failed compiler/jsr292/CallSiteDepCont…

…extTest.java

Reviewed-by: rkennke
  • Loading branch information
zhengyu123 committed Oct 17, 2019
1 parent bd96098 commit 2324892e0b792ed96d76ed32f80e7e3de1f4a49f
@@ -268,17 +268,12 @@ oop ShenandoahBarrierSet::oop_load_from_native_barrier(oop obj) {
}

ShenandoahMarkingContext* const marking_context = _heap->marking_context();

if (_heap->is_evacuation_in_progress()) {
// Normal GC
if (!marking_context->is_marked(obj)) {
return NULL;
}
} else if (_heap->is_concurrent_traversal_in_progress()) {
// Traversal GC
if (marking_context->is_complete() &&
!marking_context->is_marked(resolve_forwarded_not_null(obj))) {
if (_heap->is_evacuation_in_progress() && !marking_context->is_marked(obj)) {
Thread* thr = Thread::current();
if (thr->is_Java_thread()) {
return NULL;
} else {
return obj;
}
}

@@ -1902,7 +1902,7 @@ void ShenandoahHeap::set_concurrent_mark_in_progress(bool in_progress) {
}

void ShenandoahHeap::set_concurrent_traversal_in_progress(bool in_progress) {
set_gc_state_mask(TRAVERSAL | HAS_FORWARDED | UPDATEREFS, in_progress);
set_gc_state_mask(TRAVERSAL, in_progress);
ShenandoahBarrierSet::satb_mark_queue_set().set_active_all_threads(in_progress, !in_progress);
}

@@ -2060,7 +2060,12 @@ void ShenandoahHeap::parallel_cleaning(bool full_gc) {
}

void ShenandoahHeap::set_has_forwarded_objects(bool cond) {
set_gc_state_mask(HAS_FORWARDED, cond);
if (is_traversal_mode()) {
set_gc_state_mask(HAS_FORWARDED | UPDATEREFS, cond);
} else {
set_gc_state_mask(HAS_FORWARDED, cond);
}

}

void ShenandoahHeap::set_process_references(bool pr) {
@@ -390,6 +390,7 @@ void ShenandoahTraversalGC::init_traversal_collection() {
}

_heap->set_concurrent_traversal_in_progress(true);
_heap->set_has_forwarded_objects(true);

bool process_refs = _heap->process_references();
if (process_refs) {
@@ -601,11 +602,14 @@ void ShenandoahTraversalGC::final_traversal_collection() {
TASKQUEUE_STATS_ONLY(_task_queues->reset_taskqueue_stats());

// No more marking expected
_heap->set_concurrent_traversal_in_progress(false);
_heap->mark_complete_marking_context();

fixup_roots();
_heap->parallel_cleaning(false);

_heap->set_has_forwarded_objects(false);

// Resize metaspace
MetaspaceGC::compute_new_size();

@@ -651,7 +655,6 @@ void ShenandoahTraversalGC::final_traversal_collection() {
}

assert(_task_queues->is_empty(), "queues must be empty after traversal GC");
_heap->set_concurrent_traversal_in_progress(false);
assert(!_heap->cancelled_gc(), "must not be cancelled when getting out here");

if (ShenandoahVerify) {

0 comments on commit 2324892

Please sign in to comment.
You can’t perform that action at this time.