Does DTrace on FreeBSD support macro argument?

Nan Xiao xiaonan830818 at gmail.com
Fri Aug 18 07:27:45 UTC 2017


Hi all,

Greetings from me!

I am trying the following simple script on FreeBSD 11:

#!/usr/sbin/dtrace -s

syscall::write:entry
/pid == $1/
{
}

and get following error:

# ./tracewrite.d
dtrace: failed to compile script ./tracewrite.d: line 4: macro
argument $1 is not defined

>From this link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html),
it seems FreeBSD doesn't support macro argument, right? If I want to
use it, what is the correct method?

Thanks very much in advance!

Best Regards
Nan Xiao


More information about the freebsd-dtrace mailing list