you are doing a sum and its quite possible. (atleast for the functions you listed) Try counting the number of times each function is called in your D script. Check how many times g_type_check_instance-is_a() called just when you pass the mouse over the gcalctool. I got morethan 500 times calls to the above function for about a sec of mouse over the gcalctool :-)
~Sriram On Nov 14, 2007 10:32 PM, sham pavman <shampavman.cg at gmail.com> wrote: > 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) > _______________________________________________ > ug-bosug mailing list > List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org > List-Owner: mailto:ug-bosug-owner at opensolaris.org > List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/ug-bosug/attachments/20071115/47f72da4/attachment.html>