Using the following dtrace command, I can see who''s calling what with lots of +/- numbers: dtrace -n ''fbt:ip:ip_output:entry{@dbtypes[((mblk_t *)arg1)->b_datap->db_type,caller] = count();}'' ...the output is what I want but not how I want to see it. What I''d rather see is the function names associated with caller and for db_type to be output in hex. Looking at the docs online for s10, http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_built_in_vars.html doesn''t appear to have a string equivalent of "caller" and http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_functions.html doesn''t appear to have a way to convert caller to a string :-( Is any of this available in nevada? Thanks, Darren -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070404/93ac444b/attachment.html>
The %a format specifier can be used to format a numeric address as a symbolic string. Does that solve the problem? Adam On Wed, Apr 04, 2007 at 05:47:50PM +1000, Darren Reed wrote:> Using the following dtrace command, I can see who''s calling what with lots of +/- numbers: > > dtrace -n ''fbt:ip:ip_output:entry{@dbtypes[((mblk_t *)arg1)->b_datap->db_type,caller] = count();}'' > > ...the output is what I want but not how I want to see it. > > What I''d rather see is the function names associated with caller and for db_type to be output in hex. > > Looking at the docs online for s10, > http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_built_in_vars.html > doesn''t appear to have a string equivalent of "caller" and > http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_functions.html > doesn''t appear to have a way to convert caller to a string :-( > > Is any of this available in nevada? > > Thanks, > Darren> _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Yes, that does what I want, thanks. I modified it to be: dtrace -q -n ''fbt:ip:ip_output:entry{@dbtypes[((mblk_t *)arg1)->b_datap->db_type,caller] = count();}'' -n ''dtrace:::END{printa("%#x\t%a\n", @dbtypes);}'' Cheers, Darren From: "Adam Leventhal" <ahl at eng.sun.com>> The %a format specifier can be used to format a numeric address as a > symbolic > string. Does that solve the problem? > > Adam > > On Wed, Apr 04, 2007 at 05:47:50PM +1000, Darren Reed wrote: >> Using the following dtrace command, I can see who''s calling what with >> lots of +/- numbers: >> >> dtrace -n ''fbt:ip:ip_output:entry{@dbtypes[((mblk_t >> *)arg1)->b_datap->db_type,caller] = count();}'' >> >> ...the output is what I want but not how I want to see it. >> >> What I''d rather see is the function names associated with caller and for >> db_type to be output in hex. >> >> Looking at the docs online for s10, >> http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_built_in_vars.html >> doesn''t appear to have a string equivalent of "caller" and >> http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_functions.html >> doesn''t appear to have a way to convert caller to a string :-( >> >> Is any of this available in nevada? >> >> Thanks, >> Darren > >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org > > -- > Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >