"Leak"/reference hunting with RefsHunter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"Leak"/reference hunting with RefsHunter

Holger Freyther
Hi,

as I didn't remember the name of the tool and maybe as future reference to myself. I have installed RefsHunter from the catalogue and it helped me a lot.

I was looking at the memory consumption of my Pharo6.0 image and did something crazy like counting how many objects exist of a specific class (Object allSubInstances copy do.. and put that into a dictionary). I noticed that for the ASN1 model the nodes of the parse tree survived. Yesterday I tried to use the pointer explorer but then most references are held by the UI code and I gave up after a bit.

Today I found the RefsHunter again and something as simple (found through the class comments)

        | rh |
        rh := RefsHunter snapshot.
        rh wayFrom: ASN1AssignmentNode allInstances first to: myAsn1Model


Brings me to a list of references and when searching the list from the end to the beginning gives a pretty good picture of where things go wrong.


Great to have a platform that allows to walk the heap and great that there are tools that make it manageable!


have a nice weekend

        holger
Reply | Threaded
Open this post in threaded view
|

Re: "Leak"/reference hunting with RefsHunter

Pavel Krivanek-3
In the most of standard cases you can use ReferenceFinder. It is in the catalog too and I think that we should integrate it into the Pharo because it is extremely useful for the memory leaks detection. It does not require snapshots and I firstly try it before applying of the RefsHunter (and I say that as the author of the RefsHunter ;-))

-- Pavel

2017-07-22 17:04 GMT+02:00 Holger Freyther <[hidden email]>:
Hi,

as I didn't remember the name of the tool and maybe as future reference to myself. I have installed RefsHunter from the catalogue and it helped me a lot.

I was looking at the memory consumption of my Pharo6.0 image and did something crazy like counting how many objects exist of a specific class (Object allSubInstances copy do.. and put that into a dictionary). I noticed that for the ASN1 model the nodes of the parse tree survived. Yesterday I tried to use the pointer explorer but then most references are held by the UI code and I gave up after a bit.

Today I found the RefsHunter again and something as simple (found through the class comments)

        | rh |
        rh := RefsHunter snapshot.
        rh wayFrom: ASN1AssignmentNode allInstances first to: myAsn1Model


Brings me to a list of references and when searching the list from the end to the beginning gives a pretty good picture of where things go wrong.


Great to have a platform that allows to walk the heap and great that there are tools that make it manageable!


have a nice weekend

        holger

Reply | Threaded
Open this post in threaded view
|

Re: "Leak"/reference hunting with RefsHunter

Holger Freyther

> On 22. Jul 2017, at 20:40, Pavel Krivanek <[hidden email]> wrote:
>
> In the most of standard cases you can use ReferenceFinder. It is in the catalog too and I think that we should integrate it into the Pharo because it is extremely useful for the memory leaks detection. It does not require snapshots and I firstly try it before applying of the RefsHunter (and I say that as the author of the RefsHunter ;-))

Cool and thank you for RefsHunter! I found RefsHunter by typing "leak". Could we get this attached to the ReferenceFinder in the catalog as well?

holger
Reply | Threaded
Open this post in threaded view
|

Re: "Leak"/reference hunting with RefsHunter

Stephane Ducasse-3
Hi holger

I do not know who is maintinaing the config of ReferenceFinder but yes
on the principle.

Stef

On Sat, Jul 22, 2017 at 9:58 PM, Holger Freyther <[hidden email]> wrote:
>
>> On 22. Jul 2017, at 20:40, Pavel Krivanek <[hidden email]> wrote:
>>
>> In the most of standard cases you can use ReferenceFinder. It is in the catalog too and I think that we should integrate it into the Pharo because it is extremely useful for the memory leaks detection. It does not require snapshots and I firstly try it before applying of the RefsHunter (and I say that as the author of the RefsHunter ;-))
>
> Cool and thank you for RefsHunter! I found RefsHunter by typing "leak". Could we get this attached to the ReferenceFinder in the catalog as well?
>
> holger