Skip to content

Commit f84be36

Browse files
author
William Kemper
committed
8241066: Shenandoah: fix or cleanup SH::do_full_collection
Reviewed-by: shade
1 parent 1e5e17a commit f84be36

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,8 +1576,8 @@ void ShenandoahHeap::collect_as_vm_thread(GCCause::Cause cause) {
15761576
// cycle. We _could_ cancel the concurrent cycle and then try to run a cycle directly
15771577
// on the VM thread, but this would confuse the control thread mightily and doesn't
15781578
// seem worth the trouble. Instead, we will have the caller thread run (and wait for) a
1579-
// concurrent cycle in the prologue of the heap inspect/dump operation. This is how
1580-
// other concurrent collectors in the JVM handle this scenario as well.
1579+
// concurrent cycle in the prologue of the heap inspect/dump operation (see VM_HeapDumper::doit_prologue).
1580+
// This is how other concurrent collectors in the JVM handle this scenario as well.
15811581
assert(Thread::current()->is_VM_thread(), "Should be the VM thread");
15821582
guarantee(cause == GCCause::_heap_dump || cause == GCCause::_heap_inspection, "Invalid cause");
15831583
}
@@ -1587,7 +1587,10 @@ void ShenandoahHeap::collect(GCCause::Cause cause) {
15871587
}
15881588

15891589
void ShenandoahHeap::do_full_collection(bool clear_all_soft_refs) {
1590-
//assert(false, "Shouldn't need to do full collections");
1590+
// This method is only called by `CollectedHeap::collect_as_vm_thread`, which we have
1591+
// overridden to do nothing. See the comment there for an explanation of how heap inspections
1592+
// work for Shenandoah.
1593+
ShouldNotReachHere();
15911594
}
15921595

15931596
HeapWord* ShenandoahHeap::block_start(const void* addr) const {

0 commit comments

Comments
 (0)