From owner-freebsd-current@FreeBSD.ORG Wed Jun 11 08:08:05 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E6B31065675 for ; Wed, 11 Jun 2008 08:08:05 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 025038FC16 for ; Wed, 11 Jun 2008 08:08:04 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A78BC679D2D; Wed, 11 Jun 2008 10:07:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5r+Jk9YpshRS; Wed, 11 Jun 2008 10:07:13 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 16AB06798A0; Wed, 11 Jun 2008 10:07:13 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m5B87CuX043668; Wed, 11 Jun 2008 10:07:12 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 11 Jun 2008 10:07:12 +0200 From: Roman Divacky To: John Birrell Message-ID: <20080611080712.GA43328@freebsd.org> References: <20080611051257.GA51683@what-creek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080611051257.GA51683@what-creek.com> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: Getting started with DTrace in FreeBSD-current (a.k.a. 8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2008 08:08:05 -0000 On Wed, Jun 11, 2008 at 05:12:57AM +0000, John Birrell wrote: > > It's been a few weeks now since I committed DTrace support to current. > > I did this without a headsup message to this list to give the early > adopters a chance to try it before exposing it to the world at large. > > Those who follow the committers mailing list will have seen a lot > of commits to get all the changes into the tree. > > As of now, the code is in the tree to build the tools required for > DTrace support and the DTrace kernel modules. > > For the uninitiated, DTrace uses Compact C Type Format (CTF) data in > executables (both userspace and kernel modules). This CTF data is added > to the binaries by the build tools 'ctfconvert' and 'ctfmerge'. > ctfconvert parses DWARF debug ELF sections created by the compiler and > ctfmerge merges CTF ELF sections from objects into either executables > or shared libraries. > > To start using DTrace to trace stuff in the kernel (userland tracing > isn't supported yet), here's what you need to do: > > 1. Grab the latest current sources for the entire src tree. > 2. Do a 'make buildworld' of those sources on either a -current system > or a releng7 system. > 3. Add 'options KDTRACE_HOOKS' and 'options DDB_CTF' to your kernel > config file (on i386 or amd64; users of other arches can go watch > a movie instead). > 4. Do a 'make WITH_CTF=1 buildkernel && make installkernel' are you going to make this default? if so.. when? is there userland tracing work in progress? thnx for your fantastic work! roman