I am trying to find out information about how to use dtrace for a way
of tracing user function calls. My question appears to be trivial, but
I am having difficulty trying to find where to get an answer.

I want to do a relatively trivial trace that will follow execution
into a set of *user* functions (and not system calls) giving me counts
and timing. I created a trivial hello world with several subfunctions,
but have not succeeded in getting the trace that I want. I just want
to get the dtrace showing the count and times for printit and
printline. I can of course, use pid provider to generate the trace
when I trigger a script with

script.d -c :hello this is a test"

and have the script use count() and sum() with timestamp.

However, I want to run a set of tests in python that would trigger my
application with appropriate arguments. I would then have dtrace
detect that the application has started and process it.

Of course, the actual program that I am trying to trace is much more
complex, but if I can get this trivial case working, I can see what I
am doing. I would expect that the trace
would give the count and timing by function name. In the "real" code
that I am testing, I have a number of functions working in different
threads that I am going to want to drill into. I would not be able to
know the pid's in advance.

In effect the python test code will be running an analysis and
starting several instances of the application. The application would
generate threads.

Does self->ts[probefunc] = timestamp for example get the data only for
the current thread or will I get the information for every thread?

-- 
       Sabba     -          סבא הלל        -     Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, "Join me ashore"
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://photos1.blogger.com/blogger/7637/544/640/SabbaHillel.jpg
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to