RFR: Remove racy assert in ShenandoahResetNextMarkBitmapTraversalTask
Roman Kennke
rkennke at redhat.com
Tue Sep 11 12:06:22 UTC 2018
The assert in ShenandoahResetNextMarkBitmapTraversalTask that is racily
checking TAMS against top. Racy because other manipulations (e.g.
recycle-assist) happen under HeapLock, but not this check. This
sometimes blows up. I don't know how to fix that except removing it. We
could acquire the HeapLock under #ifdef ASSERT but that seems like overkill.
With this patch, aarch64 passes tier3_gc_shenandoah
Notice that the whole thing is still somewhat racy, but seems
conservatively ok. Getting this right without serializing the
reset-bitmaps-stuff would require to use per-region-locks for this sort
of thing.
Ok?
Roman
# HG changeset patch
# User rkennke
# Date 1536667335 -7200
# Tue Sep 11 14:02:15 2018 +0200
# Node ID 088a07bcf78aa6b020b7cc1c60231bb2dacc39b7
# Parent a391e22f381ea337ed647b4da4fd3c26def6c03f
Remove racy assert in ShenandoahResetNextMarkBitmapTraversalTask
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
@@ -471,9 +471,6 @@
assert(heap->is_bitmap_slice_committed(region), "sanity");
HeapWord* bottom = region->bottom();
HeapWord* top =
next_ctx->top_at_mark_start(region->region_number());
- assert(top <= region->top(),
- "TAMS must smaller/equals than top: TAMS: "PTR_FORMAT",
top: "PTR_FORMAT,
- p2i(top), p2i(region->top()));
if (top > bottom) {
compl_ctx->mark_bit_map()->copy_from(next_ctx->mark_bit_map(),
MemRegion(bottom, top));
compl_ctx->set_top_at_mark_start(region->region_number(), top);
More information about the shenandoah-dev
mailing list