I wrote a DTrace script that measures the time spent inside a function in my C program. The program itself starts, prints some data, and then exits.
The problem is that it ends the path to speed up for me to get the process ID and start DTrace.
Right now I have a sleep () statement inside my code that gives me enough time to run DTrace. To change the code to get information about it, he defeats the Dtrace target ... correctly.
Basically what I need is to get DTrace to wait for the process identifier to appear, and then run my script against it.
source share