Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2008 11:04:53 +0200
From:      Lionel Flandrin <simias.n@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   DTrace complains about struct thread
Message-ID:  <20081015090453.GA1995@casibsd.elexo.fr.local>

next in thread | raw e-mail | index | archive | help
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?


-- 
Lionel Flandrin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081015090453.GA1995>