Can not use dtrace on FreeBSD8.1p1/amd64

Code:
~> uname -a
FreeBSD compaq.yuetime 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #5: Wed Nov  3 16:27:06 CDT 2010     
[email]root@compaq.yuetim[/email]e:/usr/obj/usr/src/sys/HOUKAGO  amd64

I added the required options to the kernel config file:

Code:
options KDTRACE_FRAME
options KDTRACE_HOOKS
options DDB_CTF
and compiled/installed the kernel WITH_CTF=1 successfully. The dtraceall is loaded, and dtrace -l works. But whenever I want to run a dtrace command, I get something like:

Code:
dtrace: invalid probe specifier syscall: "/usr/lib/dtrace/psinfo.d", line 88: failed to resolve type kernel`struct thread * for identifier curthread: Unknown type name

Note that all of the probes I wanted to use exist in the output of dtrace -l. I saw someone else who got the same error, but I found no solution. Any suggestions are welcome, thank you.
 
You are not the only one, I am getting the same error:
Code:
[root@... ~/DTraceToolkit-0.99]# ./hotkernel 
Sampling... Hit Ctrl-C to end.
dtrace: invalid probe specifier 
        #pragma D option quiet
        profile:::profile-1001hz
        /arg0/
        {
                @pc[arg0] = count();
        }
        dtrace:::END
        {
                printa("%a %@d\n", @pc);
        }
: "/usr/lib/dtrace/psinfo.d", line 88: failed to resolve type kernel`struct thread * for identifier curthread: Unknown type name

FUNCTION                                                COUNT   PCNT

Is there anyone using DTrace successfully? Is this an AMD64 problem, or a BSD problem?
 
Now I updated my system to FreeBSD 8-STABLE, and the problem becomes even worse. I compiled the kernel WITH_CTF=1, but I got the error message which is as the same as that I got using a CTF disabled kernel:
Code:
dtrace: failed to compile script d.d: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"
 
Back
Top