On Thu, 26 Feb 2009, Alexander Leidinger wrote:

A typical tracing command might be:

 dtrace -n 'priv:::priv_ok { trace(execname); trace(arg0);}'

arg0 requires manual interpretation using /usr/include/sys/priv.h.

Theoretically it is possible to write a little script which takes priv.h and generates a little bit of dtrace stuff which allows to print out strings instead of numbers. But I think this is a matter of motivation...

I would also use printf("program: %s, priv: $d\n", execname, arg0) or something similar with printf, but this is cosmetics.

Should we create a repository of dtrace scripts in /usr/share or wherever? For the linuxulator I have several scripts in my linuxulator-dtrace branch (some more, some less useful for non-developers).

I have a couple up on the wiki on the DTrace/Examples page from some callout-related profiling I was doing, but some sort of more formal library would be good. I guess the question is "how productionable do we want them to be" -- if they're just fragments then a wiki or the tools tree might be good; if it's really going to be a formal set of analysis tools with consistent interface, style, and maintained over time then usr/share would be better, but I think having consistency in approach and content would be something very much to encourage.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to