RFR: Missing Evac OOM scope when reference processor is single threaded
Aleksey Shipilev
shade at redhat.com
Fri Jul 20 11:13:59 UTC 2018
On 07/20/2018 12:57 PM, Zhengyu Gu wrote:
> On 07/20/2018 06:42 AM, Aleksey Shipilev wrote:
>> On 07/20/2018 12:36 PM, Zhengyu Gu wrote:
>>> When ReferenceProcessor processes references in single-threaded mode, it uses current thread, not
>>> task executor, and we miss Evac OOM scope for current thread.
>>>
>>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/missing_evac_oom_scope/webrev.00/index.html
>>
>> I am confused: which path enters write barrier / evacuation code via the reference processing?!
>
> Here is the backtrace: https://paste.fedoraproject.org/paste/2yVhSCOWQfMS9jXEQNe~hQ
>
> and looks like we don't need scope for CM.
Okay, so it seems to be traversal-only, right? The change in shenandoahConcurrentMark is not needed
then.
It seems to me, we need to enter the oom-scope in ShenandoahTraversalDrainMarkingStackClosure,
because it calls into the main_loop that may evacuate. The same probably applies to
ShenandoahTraversalPrecleanCompleteGCClosure that also enters main_loop, and entering the scope here
is not needed then, right?
if (!_heap->cancelled_gc() && ShenandoahPreclean && _heap->process_references()) {
ShenandoahEvacOOMScope oom_evac_scope;
preclean_weak_refs();
}
-Aleksey
More information about the shenandoah-dev
mailing list