"Leak"/reference hunting with RefsHunter
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
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 <holger@freyther.de>:
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
On 22. Jul 2017, at 20:40, Pavel Krivanek <pavel.krivanek@gmail.com> 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
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 <holger@freyther.de> wrote:
On 22. Jul 2017, at 20:40, Pavel Krivanek <pavel.krivanek@gmail.com> 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
participants (3)
-
Holger Freyther -
Pavel Krivanek -
Stephane Ducasse