Hi
I would to be able to see when an incremental GC is happening. is there a way to know when a GC is happening? S.
-------------------------------------------- Stéphane Ducasse 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France |
On Wed, Sep 9, 2020 at 11:58 PM Eliot Miranda <[hidden email]> wrote:
> In VisualWorks, for example, a WeakArray is primed with an Object instance, and this gets collected every scavenge. > So the WeakArray is notified. From this VW builds a notification system. I guess this is how VisualWorks changes its cursor from a regular pointer to the, sometimes dreadful, "GC" icon during garbage collection. Isn't it? Regards! Esteban A. Maringolo |
On Wed, Sep 9, 2020 at 9:49 PM Esteban Maringolo <[hidden email]> wrote: On Wed, Sep 9, 2020 at 11:58 PM Eliot Miranda <[hidden email]> wrote: I think so :-)
and to you, Esteban! _,,,^..^,,,_ best, Eliot |
In reply to this post by Esteban A. Maringolo
On 9/9/20 8:43 PM, Esteban Maringolo wrote:
> On Wed, Sep 9, 2020 at 11:58 PM Eliot Miranda <[hidden email]> wrote: > >> In VisualWorks, for example, a WeakArray is primed with an Object instance, and this gets collected every scavenge. >> So the WeakArray is notified. From this VW builds a notification system. > I guess this is how VisualWorks changes its cursor from a regular > pointer to the, sometimes dreadful, "GC" icon during garbage > collection. > Isn't it? > No, that wouldn't work. Notification based on a weak array can only notify after the scavenge (or other GC) has happened, at which point it's too late to put up the GC cursor. And a weak array doesn't seem like it could be reliable for notification of scavenge -- what if the Object in the weak array gets tenured? Then only an incremental or full GC could collect it and notify. Scavenge notification is done by the VM signaling a semaphore that a scavenge notification thread is waiting on. And the GC cursor is simple -- it's explicitly set by Smalltalk code before a compacting GC, and set back afterward. Regards, -Martin |
In reply to this post by Stéphane Ducasse
If Pharo's gc algorithm is concurrent => maybe yes, One can try to create an ephemeron and check it every 100-500
ms, On 09/09/2020 13:38, Stéphane
Ducasse wrote:
Hi -- Ing. Davide Grandi email : [hidden email] mobile : +39 339 7468 778 linkedin : http://linkedin.com/in/davidegrandi |
In reply to this post by Stéphane Ducasse
Hi I wish there was a way to control *when* full GC is allowed to happen. For example, I would prefer GC to occur while the UI rendering loop is paused and not in the middle of the frame resulting in sometimes sluggish animations in the case of large images. Thank you On Wed, 9 Sep 2020 at 14:39, Stéphane Ducasse <[hidden email]> wrote:
Cheers, Alex |
Maybe it's undecidable. On 10/09/2020 10:41, Aliaksei Syrel
wrote:
-- Ing. Davide Grandi email : [hidden email] mobile : +39 339 7468 778 linkedin : http://linkedin.com/in/davidegrandi |
In reply to this post by Aliaksei Syrel
Hi Aliaksei,
In VW, scavenges are done automatically by the VM, but all heavier-weight GC is controlled by the image, through a MemoryPolicy object. In the GemStone client for VW we provide a memory policy that discourages GC during times when our mapping dictionaries are strong, deferring it to just after we make the dictionaries weak so the GC can actually collect things that are mapped but no longer used. It sounds like you'd like something very much like this, to tend to defer GC to a good point in the rendering cycle. And "tend to" is important -- when space is getting *really* low, it's a good idea to go ahead and do the GC regardless of whether it's a "good" time. Regards, -Martin On 9/10/20 1:41 AM, Aliaksei Syrel wrote:
|
Free forum by Nabble | Edit this page |