Re: [Pharo-dev] is there a way to know when a GC is happening?

2020-09-10 Thread Martin McClure

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:

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 
mailto:stephane.duca...@inria.fr>> wrote:


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
http://stephane.ducasse.free.fr / http://www.pharo.org
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







--
Cheers,
Alex




[Pharo-dev] [Pharo 9.0] Build #655: SettingsTree-optimize-PragmaCollector

2020-09-10 Thread ci-pharo-ci-jenkins2
There is a new Pharo build available!
  
The status of the build #655 was: FAILURE.

The Pull Request #7289 was integrated: "SettingsTree-optimize-PragmaCollector"
Pull request url: https://github.com/pharo-project/pharo/pull/7289

Issue Url: https://github.com/pharo-project/pharo/issues/SettingsTree
Build Url: 
https://ci.inria.fr/pharo-ci-jenkins2/job/Test%20pending%20pull%20request%20and%20branch%20Pipeline/job/Pharo9.0/655/


[Pharo-dev] [Pharo 9.0] Build #654: 7276-Better-comments-for-Point-methods

2020-09-10 Thread ci-pharo-ci-jenkins2
There is a new Pharo build available!
  
The status of the build #654 was: FAILURE.

The Pull Request #7285 was integrated: "7276-Better-comments-for-Point-methods"
Pull request url: https://github.com/pharo-project/pharo/pull/7285

Issue Url: https://github.com/pharo-project/pharo/issues/7276
Build Url: 
https://ci.inria.fr/pharo-ci-jenkins2/job/Test%20pending%20pull%20request%20and%20branch%20Pipeline/job/Pharo9.0/654/


[Pharo-dev] [Pharo 9.0] Build #653: More-PragmaCollector-Improvements

2020-09-10 Thread ci-pharo-ci-jenkins2
There is a new Pharo build available!
  
The status of the build #653 was: SUCCESS.

The Pull Request #7282 was integrated: "More-PragmaCollector-Improvements"
Pull request url: https://github.com/pharo-project/pharo/pull/7282

Issue Url: https://github.com/pharo-project/pharo/issues/More
Build Url: 
https://ci.inria.fr/pharo-ci-jenkins2/job/Test%20pending%20pull%20request%20and%20branch%20Pipeline/job/Pharo9.0/653/


Re: [Pharo-dev] is there a way to know when a GC is happening?

2020-09-10 Thread Davide Grandi

Maybe it's undecidable.
Now it happens when a memory space is full, and I
think that memory spaces aren't dynamically configurable.

    Davide

On 10/09/2020 10:41, Aliaksei Syrel wrote:

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 
mailto:stephane.duca...@inria.fr>> wrote:


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
http://stephane.ducasse.free.fr/ http://www.pharo.org
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

--
Cheers,
Alex


--
Ing. Davide Grandi
email: davide.gra...@email.it
mobile   : +39 339 7468 778
linkedin : http://linkedin.com/in/davidegrandi



Re: [Pharo-dev] is there a way to know when a GC is happening?

2020-09-10 Thread Aliaksei Syrel
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 
wrote:

> 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
> http://stephane.ducasse.free.fr / http://www.pharo.org
> 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
>
>
>
>
>
>
>
> --
Cheers,
Alex


Re: [Pharo-dev] is there a way to know when a GC is happening?

2020-09-10 Thread Davide Grandi

If Pharo's gc algorithm is concurrent => maybe yes,
otherwise surely no : if I'm not wrong gc starts inside VM
when checking allocation spaces during a basicNew or alike.
And the VM seems stuck, at that moment.

One can try to create an ephemeron and check it every 100-500 ms,
refreshing it if it's still here (so it will stay in new space).
But it shift the question to the definitive target group :
the VM guys !!!

Chers from Lombardy,
    Davide
(PS : but creating the ephemeron could start an invisible gc !!!)

On 09/09/2020 13:38, Stéphane Ducasse wrote:

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
http://stephane.ducasse.free.fr/ http://www.pharo.org
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


--
Ing. Davide Grandi
email: davide.gra...@email.it
mobile   : +39 339 7468 778
linkedin : http://linkedin.com/in/davidegrandi



Re: [Pharo-dev] is there a way to know when a GC is happening?

2020-09-10 Thread Martin McClure

On 9/9/20 8:43 PM, Esteban Maringolo wrote:

On Wed, Sep 9, 2020 at 11:58 PM Eliot Miranda  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