On Sat, Jan 12, 2008 at 02:03:42AM +0000, Andy Armstrong wrote:

> >  http://blogs.sun.com/levon/entry/python_and_dtrace_in_build
> 
> I read that Bryan. I got the impression - maybe incorrectly - that it  
> relies on the Python interpreter recursing when it enters a Python  
> function - so that a walk up the C stack visits all entries in the  
> Python stack. Did I get that wrong?

Nope, that's right.

> Perl doesn't recurse in C when it calls a Perl subroutine so walking  
> up the stack won't yield a Perl call chain.

I always got the impression the difficulty was in walking the stack for
the relevant Perl thread at all, not just the C vs. Perl stack issue.

Whilst the C stack issue is a problem, it's not necessarily a major one.
Presuming (and I really don't know) that it's easy to get to the top of
the Perl stack from the available initial state, and it's feasible to
traverse the relevant structures, in theory we could extend the ustack()
implementation with a yield()-style approach: that is, the helper is
called multiple times and each time yields a relevant string until
"done".

I'm sure Bryan will jump and tell me I'm crazy.

BTW this has been discussed before:

http://mail.opensolaris.org/pipermail/dtrace-discuss/2007-September/004572.html

regards
john

Reply via email to