[ug-bosug] Time tracking problem

sham pavman shampavman.cg at gmail.com
Wed Nov 14 09:02:45 PST 2007


Hi,

I am new to dtrace and so was just trying it out on the "calculator"
application , and no sooner did I start than I ran into some strange
scenarios

I had coded to find the time spent in each functions and it showed me
some abnormal timings..
Here is the procedure i followed.

**********************************************************************

1.Started the calculator application
2.obtained the id.
             #pgrep gcalctool
3.Wrote the dscript as follows using the vi editor

pid$1:::entry
{
ts=timestamp;
}

pid$1:::return /ts/
{
@[probefunc]=sum(timestamp -ts);
}

4. dtrace -s (name of the file.d) (pid)
  name of the file and pid were filled in accordingly .

5.This is the output I got.(The last 7 functions only)

mutex_lock                                           1091011640
lookup_type_node_I                               1472834888
type_node_conforms_to_U                      1717598564
_pollsys                                                 2155497424
_pollsys                                                 2157975764
poll                                                        2159596918
g_type_check_instance-is_a                    2300007485

**********************************************************************

Now from what i understand , the value of time spent is in nano
seconds, even then the value of these functions exceeds 1.5secs on
average (it obviously did not take that much time for me to see the
result of my calculation) .

I wanted to know if my understanding of the logic was wrong or have I
found myself a couple of bugs :-)..
Am using  b-72.

Thanking you
Shampavman
(Campus ambassador)
(JSSATE)


More information about the ug-bosug mailing list