RFR: 8254315: Shenandoah: Concurrent weak reference processing [v12]

Roman Kennke rkennke at openjdk.java.net
Wed Oct 28 14:41:54 UTC 2020


On Wed, 28 Oct 2020 14:38:02 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp line 404:
>> 
>>> 402:   assert(ctx->is_complete(), "sanity");
>>> 403: 
>>> 404:   const ShenandoahMarkBitMap* mark_bit_map = ctx->mark_bit_map();
>> 
>> Why `const`? Not necessarily wrong, but inconsistent with the rest of the method.
>
> mark_bit_map() only returns a const now, and I think that's better: *if* we are to expose the bitmap, then better make it read-only.

OTOH, it is only used to call get_next_marked_addr() which we can do just as well through ctx, and not expose the bitmap to begin with.

-------------

PR: https://git.openjdk.java.net/jdk/pull/505


More information about the shenandoah-dev mailing list