On Mon, Aug 30, 2010 at 10:42:27AM -0700, Jonathan Adams wrote:
> On Mon, Aug 30, 2010 at 12:29:18PM -0500, Nicolas Williams wrote:
> > Can't this be done with dtrace_xcall()?
> 
> You can't cross-call from probe context, let alone wait for one to complete.
> 
> dtrace_xcall() is used by the dtrace infrastructure to ensure that any 
> in-flight
> dtrace_probe()s while a state change was happening have completed before
> continuing on to the next step.

Ah, thanks for the tip.

> > BTW, another backtrace-like action I'd love to see would be something
> > like ptree(), which would output ptree(1)-like output (but without
> > program arguments) that could then be aggregated on.
> 
> That could be handy.

Yes, I think it would be, particularly for profiling apps with lots of
short-lived processes, such as ON's build :)  Something like:

profile-2
/uid == 12345/
{
        /* Need cwd since we don't get program args */
        @ptrees[ptree(), cwd] = count();
}

Can one safely chase proc_t pointers in dtrace context?

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

Reply via email to