RFR: 8254315: Shenandoah: Concurrent weak reference processing [v12]
Aleksey Shipilev
shade at openjdk.java.net
Thu Oct 29 14:09:50 UTC 2020
On Tue, 27 Oct 2020 14:52:09 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp line 81:
>>
>>> 79: _heap(ShenandoahHeap::heap()),
>>> 80: _mark_context(_heap->marking_context()),
>>> 81: _strong(true)
>>
>> Do we want to turn this to yet another template parameter, like for dedup? That would also resolve passing `true` or `false` to `strong` argument without comments.
>
> We need to switch strength in ShenandoahConcurrentMark::do_task() and we get passed-in a ready closure there. I am not sure how we could do that with template-args. Template args only make sense for things that don't change during marking.
Tried to see what if templating can be done. I think the major hurdle is that weak _tasks_ can be stolen by other workers. Which means every worker should check for weakness for every task, and thus would require changing the closure "flavor" on the fly. This seems like a no-go. You can resolve this conversation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/505
More information about the shenandoah-dev
mailing list