Subject: Re: [feature/igc] Remaining known tracing issues

From: Pip Cet <[email-masked]>
Date: Mon, 10 Feb 2025 19:23:49 +0000

"Paul Eggert" <[email-masked]> writes:

> On 2/10/25 07:15, Pip Cet wrote:
>> a potential rewrite to always keep jump buffers on the C
>> stack (Paul).
>
> Another possibility would be to change igc_alloc_handler so that jump
> buffers on the heap are scanned conservatively.

Thanks!

That's the stop-gap patch, yes: turning it into an "ambiguous" root.

> Both possibilities have merits; I am not sure which would be better.

(Note that MPS does not allow ordinary heap objects to be scanned
conservatively, just roots; and while it does allow roots to be
protected with memory barriers, we don't make use of that yet.  My
understanding from reading some comments in the MPS code is that it's
strongly optimized for not having additional large unprotected roots in
addition to the C stack).

My main argument for preferring the (slightly harder) solution of
keeping the jump buffers on the C stack is that the handlerlist could
shrink once again; right now, a large handlerlist never shrinks and
treats many disjoint areas as a permanent ambiguous root, IIUC.  As my
hope is to make GC more frequent and use protection more, large
unprotected roots seem like a problem right now.

Pip