Calling C function from DTrace scripts -
is basically an impressive, powerful tracing system from Solaris, but it is kept on FreeBSD and Mac OSX.
DTC uses a high level language called A, which is not called opposite to DW or C. Here's an example:
io ::: start / pid == $ 1 / {printf ("file% s offset% d size% d block% llu \ n", args [2 ] -> fi_pathname, args [2] -> fi_offset, args [0] -> b_bacount, args [0] -> gt; b_blocks); }
Command line sudo dtrace -q -s & lt; Name & gt; .d & lt; Pid & gt;
All IOs generated from that process are logged.
My question is, if it is possible to call custom C functions from DTC scripts, during tracing only for advanced operation with that tracing data.
Deterus explanation prevents you from doing something similar, because you can not write a loop in D : If you screw it in any way, size, or form, you crash the whole system when a D check is in the fire, you are in the Kenel mode, not the user. Quote from "Linux kernel module programming guide": "
So, you want to write kernel module, you know, you have written many common programs to run in the form of processes, And now where you want to take real action, where a wild indicator can erase your file system and reboot from a native dump.
That is why you can check Do not want to play shepherds Area restrictions and why D are good for you =]
Comments
Post a Comment