Mantis - Squeak
Viewing Issue Advanced Details
7158 Tools minor always 08-20-08 08:05 02-06-11 23:47
matthewf  
matthewf  
normal  
closed  
fixed  
none    
none trunk  
0007158: Pointer tracing tools do not consistently find pointers
There are two tools in Squeak to figure out why an object that has been deleted is not being garbage collected: the PointerExplorer and the PointerFinder. Both of them don't find certain classes of pointers

The PointerExplorer doesn't know that instances "point" to their class, as far as the garbage collector is concerned

The PointerFinder doesn't know that CompiledMethods contain pointers
has duplicate 0002715closed KenCausey PointerFinder does not look into CompiledMethods 
 TracingFixes-M7158.mtf.cs [^] (22,816 bytes) 08-20-08 08:16

Notes
(0012505)
matthewf   
08-20-08 08:24   
I uploaded a change that fixes both problems in a bit cleaner way than did the previous fix in 0002715. I created a category in Object/ProtoObject named tracing which contains the best implementation of 4 simple methods:
outboundPointers
outboundPointersDo:
inboundPointers
inboundPointersExcluding:
pointsTo:

These superceed
Utilities pointersTo:excluding:
PointerFinder pointersTo:excluding:
PointerFinder >> followObject:

I then re-implemented the tools to use these methods, simplifying them in the process. There was an existing method named pointsTo:; I renamed it to instVarsInclude: and modified senders who did not expect it to visit classes. The only sender who used it in this way was MethodDictionary>>includes:

Finally, I made two convenience methods:
Object >> explorePointers opens a pointer explorer
Object >> chasePointers opens a pointer finder

(0012506)
matthewf   
08-20-08 08:27   
"fix begin"
Installer mantis bug: 7158 fix: 'TracingFixes-M7158.mtf.cs'.
"fix end"
(0013773)
matthewf   
05-15-10 19:27   
This is in the trunk inbox. There is a possible load order issue with the Kernel package, so I split it into two parts. Load the following 4 packages in order:

Kernel-mtf.421
Kernel-mtf.422
System-mtf.293
Tools-mtf.208
(0013799)
matthewf   
06-03-10 13:13   
I merged Kernel-mtf.421 into trunk (Kernel-mtf.454); it is just a single method addition, and will prevent loading the rest of this package from encountering an emergency evaluator if someone tries to load it in the future
(0013984)
matthewf   
12-14-10 03:19   
This is now in trunk