From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 6 14:22:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 346E816A4CE for ; Tue, 6 Jul 2004 14:22:46 +0000 (GMT) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 006ED43D1F for ; Tue, 6 Jul 2004 14:22:46 +0000 (GMT) (envelope-from ellard@eecs.harvard.edu) Received: by mail.eecs.harvard.edu (Postfix, from userid 465) id 6F4E754C613; Tue, 6 Jul 2004 10:22:45 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.eecs.harvard.edu (Postfix) with ESMTP id 6CCE454C605 for ; Tue, 6 Jul 2004 10:22:45 -0400 (EDT) Date: Tue, 6 Jul 2004 10:22:45 -0400 (EDT) From: Daniel Ellard To: freebsd-hackers@freebsd.org In-Reply-To: <20040706120130.3DF9816A57D@hub.freebsd.org> Message-ID: <20040706101140.T92636@bowser.eecs.harvard.edu> References: <20040706120130.3DF9816A57D@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Article on Sun's DTrace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2004 14:22:46 -0000 In a nutshell, here is what DTrace is about: - It has no impact on the system when it is not used. So you can leave it in all the time, instead of having a debug kernel and a production kernel. [I don't know how they achieve the "no impact" but they claim that they really mean "no", not just "negligible".] - It allows you to analyze pretty much any aspect of the kernel that you like, and it has hooks into userland as well. So if you have strange behaviors happening due to a badly-written process, you can track down what that process is doing. They demonstrate some nice examples of this. - The D language is what you use to specify how the trace info is filtered/processed/presented to you. D is not a complete programming language. It is highly constrained (i.e. no loops, no recursion, etc) in order to make sure that every path through a D program completes in finite time (otherwise, a bug in your D program might effectively hang the kernel, which is a no-no). So, you could think of it as "a million debugging printf's magically inserted into the kernel for you" along with a tool to analyze the output, but it's really much more sophisticated than that. It looks very nice. I wish I'd had it during my forays into the FreeBSD kernel. Is it hopelessly solaris-specific? Well, I was at the presentation that Bryan Cantrill gave at USENIX, where he was asked about the possibility of porting DTrace to linux. His response was something like "well, we're really trying to encourage people to use the *best* possible operating system, so no." (Of course, one might argue that this means that a FreeBSD port is imminent, but I don't think that's what he meant.) -Dan