File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
src/hotspot/share/gc/shenandoah Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -266,9 +266,19 @@ oop ShenandoahBarrierSet::oop_load_from_native_barrier(oop obj) {
266
266
return NULL ;
267
267
}
268
268
269
- if (_heap->is_evacuation_in_progress () &&
270
- !_heap->complete_marking_context ()->is_marked (obj)) {
271
- return NULL ;
269
+ ShenandoahMarkingContext* const marking_context = _heap->marking_context ();
270
+
271
+ if (_heap->is_evacuation_in_progress ()) {
272
+ // Normal GC
273
+ if (!marking_context->is_marked (obj)) {
274
+ return NULL ;
275
+ }
276
+ } else if (_heap->is_concurrent_traversal_in_progress ()) {
277
+ // Traversal GC
278
+ if (marking_context->is_complete () &&
279
+ !marking_context->is_marked (resolve_forwarded_not_null (obj))) {
280
+ return NULL ;
281
+ }
272
282
}
273
283
274
284
return load_reference_barrier_not_null (obj);
Original file line number Diff line number Diff line change @@ -593,11 +593,6 @@ void ShenandoahTraversalGC::final_traversal_collection() {
593
593
weak_refs_work ();
594
594
}
595
595
596
- if (!_heap->cancelled_gc ()) {
597
- fixup_roots ();
598
- _heap->parallel_cleaning (false );
599
- }
600
-
601
596
if (!_heap->cancelled_gc ()) {
602
597
assert (_task_queues->is_empty (), " queues must be empty after traversal GC" );
603
598
TASKQUEUE_STATS_ONLY (_task_queues->print_taskqueue_stats ());
@@ -606,6 +601,9 @@ void ShenandoahTraversalGC::final_traversal_collection() {
606
601
// No more marking expected
607
602
_heap->mark_complete_marking_context ();
608
603
604
+ fixup_roots ();
605
+ _heap->parallel_cleaning (false );
606
+
609
607
// Resize metaspace
610
608
MetaspaceGC::compute_new_size ();
611
609
You can’t perform that action at this time.
0 commit comments