From owner-svn-src-head@FreeBSD.ORG Thu Feb 26 13:33:18 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAAF11065679; Thu, 26 Feb 2009 13:33:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B4A9C8FC15; Thu, 26 Feb 2009 13:33:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 513C746B85; Thu, 26 Feb 2009 08:33:18 -0500 (EST) Date: Thu, 26 Feb 2009 13:33:18 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <20090226134937.13523qtfgxc9ik7k@webmail.leidinger.net> Message-ID: References: <200902261056.n1QAuDTL025375@svn.freebsd.org> <20090226134937.13523qtfgxc9ik7k@webmail.leidinger.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r189063 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 13:33:19 -0000 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