From owner-freebsd-current@FreeBSD.ORG Wed Oct 15 13:00:08 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62FA6106568A for ; Wed, 15 Oct 2008 13:00:08 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 10B2A8FC0C for ; Wed, 15 Oct 2008 13:00:08 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B0C159CB167; Wed, 15 Oct 2008 14:39:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vq2mjUnmDXAe; Wed, 15 Oct 2008 14:39:53 +0200 (CEST) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1A9859CB292; Wed, 15 Oct 2008 14:39:53 +0200 (CEST) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id m9FCdrea099834; Wed, 15 Oct 2008 14:39:53 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 15 Oct 2008 14:39:53 +0200 From: Roman Divacky To: Lionel Flandrin Message-ID: <20081015123953.GA99605@freebsd.org> References: <20081015090453.GA1995@casibsd.elexo.fr.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081015090453.GA1995@casibsd.elexo.fr.local> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: DTrace complains about struct thread 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, 15 Oct 2008 13:00:08 -0000 On Wed, Oct 15, 2008 at 11:04:53AM +0200, Lionel Flandrin wrote: > I tried to play with DTrace on a fresh FreeBSD 7.1, so I followed the > steps described here: > http://www.freebsd.org/doc/en/books/handbook/book.html#DTRACE > > I added these options to my kernel config: > ,---- > | options KDTRACE_HOOKS > | options DDB_CTF > | options KDTRACE_FRAME > `---- > > And rebuilt everything with "WITH_CTF=1" > (http://www.freebsd.org/doc/en/books/handbook/book.html#DTRACE-ENABLE > says make *WITH_CTF*=1 buildworld and then make *WITH_CFT* afterwards, > is it a typo? If not I think it should be more explicit because it > really looks like one). > > I restarted the computer, kldloaded the dtraceall module and dtrace -l > seems to work right: > ,---- > | # dtrace -l | wc -l > | 25825 > `---- > > However, whenever I try to trace something, I get: > ,---- > | # dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' > | dtrace: invalid probe specifier proc:::exec-success { > | trace(curpsinfo->pr_psargs); }: > | "/usr/lib/dtrace/psinfo.d", line 88: > | failed to resolve type kernel`struct thread * for identifier > | curthread: Unknown type name > `---- > > Same message with ./hotkernel from the DTraceToolkit and everything > else I've tried: > ,---- > | "/usr/lib/dtrace/psinfo.d", line 88: failed to resolve type > | kernel`struct thread * for identifier curthread: Unknown type name > `---- > > line 88 of /usr/lib/dtrace/psinfo.d is: > ,---- > | inline psinfo_t *curpsinfo = xlate (curthread->td_proc); > `---- > > ,---- > | # uname -a > | FreeBSD casibsd 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Tue Oct 14 > | 11:40:44 CEST 2008 root@casibsd:/usr/obj/usr/src/sys/CASIBSD_CONF > | amd64 > `---- > > What am I doing wrong? if I am not mistaken FreeBSD currently does not support userland tracing. this might be the cause, though the error message is strange roman