bug#39361: continuation and gc performance

Stefan Israelsson Tampe <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <CAGua6m2KPaZvTz3Gm7pX-4yMqYCNZJO6Mzjvk6+P66pd3W=dYw@mail.gmail.com>
That function marks the working stack no, what about stack segments in
continuations will they be marked correctly as well?

On Sat, Mar 21, 2020 at 6:33 PM Ludovic Courtès <[email protected]> wrote:

> Hi Stefan,
>
> Stefan Israelsson Tampe <[email protected]> skribis:
>
> > I think I found a gc leak in guile 3.0
> >
> > Isn't it so that so the continuation keep a copy of the stack. The issue
> is
> > that in the stack a raw integer or float may be present and so the gc
> > properties is less then ideal as those may be interpreted as pointers by
> > the GC and lead to parts of the heap being kept from garnage collecting.
> >
> > The information about a slot being a raw value or a scm value is
> > available as we do the correct gc updating of the stack inside guile 3.0.
> > May I propose that we add a bitvector to the continuation that indicate
> > that if a lslot is raw or not. Then add a pass that collect the rawness
> > information in the creation of the closure. Finally a custom made mark
> > procedure for closures can be made that uses all this information to make
> > sure to mark only scm slots in the stored continuation therby improving
> gc
> > perfromance.
>
> I believe what you describe is already what happens in
> ‘scm_i_vm_mark_stack’.  Or am I missing something?
>
> Thanks,
> Ludo’.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.