Date: Wed, 15 Oct 2008 14:39:53 +0200 From: Roman Divacky <rdivacky@freebsd.org> To: Lionel Flandrin <simias.n@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: DTrace complains about struct thread Message-ID: <20081015123953.GA99605@freebsd.org> In-Reply-To: <20081015090453.GA1995@casibsd.elexo.fr.local> References: <20081015090453.GA1995@casibsd.elexo.fr.local>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <psinfo_t *> (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081015123953.GA99605>