On Wed, Jul 21, 2010 at 06:15:21PM -0700, Adam Leventhal wrote:
> >> It it not generally possible to determine the the probe fires
> >> whether or not the thread is currently executing in leaf context.
> >> All symbolic translations happens in user-land after the fact for
> >> both ustack() and uaddr().
> >>   
> >> 
> > I'm afraid you lost me. What does symbolic translation have to do
> > with detecting the presence of a stack frame? I could imagine it
> > being possible to stash this info in debug sections (at least for
> > dwarf2), but I don't think that's what you're referring to here. 
> 
> Neither the symbol table nor stabs-like sections are available from
> the context in which the probe fires.

Incidentally, for frame-pointer-less code this is fatal to ustack().

GCC generates debug code for traversing stacks of frame-pointer-less
code.  That debug code requires interpretation, and it requires the live
stack.  That implies that DTrace would have to have the debug sections
mapped in and the interpreter code (running in dtrace context!).  DTrace
context can't page fault, so debug sections would have to be pinned in
memory by the kernel, and that's not bloody likely (particularly if
there is memory pressure).

Nico
-- 
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to