Thursday, March 31, 2005

Long DTrace scripts

If you try to write/run large DTrace script you can encounter problem that DTrace won't let you run such a script. In that case you can increase dtrace_dof_maxsize which can be changed on the fly (or you can put it in /etc/system). For example:

# ./big_script.d
dtrace: failed to enable './big_script.d': DIF program exceeds maximum program size

# mdb -kw
Loading modules: [ ... ]
> dtrace_dof_maxsize/E
dtrace_dof_maxsize: 262144
> dtrace_dof_maxsize/Z 0t524288
dtrace_dof_maxsize: 0x40000 = 0x80000
> dtrace_dof_max_size/E
dtrace_dof_maxsize: 524288
> $q

# ./big_script.d
dtrace: script './big_script.d' matched 264 probes

No comments: