Ian, I was using your Sampling Stack Profiler, Version5c - April 2004 a few
weeks ago to profile some operations with a ReStore object relational
mapper. I ran into some problems with ReStore's proxies while profiling.
So I made some minor changes to the profiler code to be more tolerant of
proxies. Essentially I think I just replaced class with basicClass. After
I made those changes the profiler worked great. Thanks for another awesome
The changed methods are bellow. If you can't think of any negative side
effects you may want to consider integrating them into the profiler as it
seems to handle proxies better.
"Answers true if the receiver represents the same evaluation point as
CompiledCode>>= causes quite a performance hit so only use it for blocks.
we base the comparison on the receiverClass and not the methodClass"
"cdemers - 9/27/2004 Changed to use basicClass to better handle proxies."
ifTrue: [compiledCode = aStackFrame method ifFalse: [^false]]
[(receiverClass = aStackFrame receiver basicClass and: [selector =
aStackFrame method selector])
^ip = aStackFrame ip! !
!ProfilerFrame categoriesFor: #isSameFrameAs:!public!testing! !
"Initialize the receiver from aStackFrame"
"cdemers - 9/27/2004 CHnaged to basic class to better handle Proxies."
compiledCode := aStackFrame method.
methodClass := compiledCode methodClass.
receiverClass := aStackFrame receiver basicClass.
selector := compiledCode selector.
ip := aStackFrame ip.
isBlock := aStackFrame isKindOf: BlockFrame.
!ProfilerFrame categoriesFor: #setFrame:!initializing!public! !