DTrace complains about struct thread

From: Lionel Flandrin <simias.n_at_gmail.com>
Date: Wed, 15 Oct 2008 11:04:53 +0200
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_at_casibsd:/usr/obj/usr/src/sys/CASIBSD_CONF
| amd64
`----

What am I doing wrong?


-- 
Lionel Flandrin
Received on Wed Oct 15 2008 - 07:36:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:36 UTC