[storm] Profiling project: instrumenting find()
Jeroen Vermeulen
jtv at canonical.com
Wed Aug 3 07:19:30 UTC 2011
On 2011-07-07 13:46, James Henstridge wrote:
> Have you considered using stack inspection here? You can easily
> inspect the local variables of the calling stack frames, so checking
> for profiling data in specially named locals shouldn't be too
> difficult. You could even discover multiple calling contexts by
> analysing the entire stack.
With apologies for the late reply: I've considered using stack
inspection for other parts of the profiling work, but here I think it's
not such a good idea. It's traditionally the job of the caller to
specify what it wants from the callee, and the callee executes without
discrimination between callers.
That way of working makes function calls nicely reproducible. If the
callee goes spying on the caller to figure out who it is and what it
really wants, where will it all end?
Jeroen
More information about the storm
mailing list