HI Ravi, If you want to find memory leaks, you may try to see the difference between number of mallocs and number of frees.
However you may find libumem/dbx more handy, atleast to begin with in finding memory leaks and memory corruption issues. Towards the end of the following article http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/memleaks.html you will find some details. As for finding the best time, you can use aggregation function to find the max/min of all the time spent values. Look for aggregation function section on the following link. http://partneradvantage.sun.com/protected/solaris10/adoptionkit/tech/dtrace/usage.html If you want to find real time spent, probably vtimestamp may be useful. I haven't used it myself but you can try exploring that. Thanks Suraj rps wrote: > Hi, > May be my question looks silly but I wanna get clarified with experts. > I have written several D language scripts which generated lots of output > to all my programs. > the question is, how does this output helps me to debug my programs. what > I mean is, how do I find memory leaks in the program, how do I know how much > time control struct in a function(I used "self->ts[probefunc]=timestamp" > statement. the result is in nano seconds. but how do I know what is the idle > time/best time for that particular function execution). > I have written a simple C program which allocates memory by calling "malloc" > function as: > > char *p1; char *p2; > p1=(char*)malloc(1024); > p2=(char*)malloc(1024); > > I ran Dtrace for the same, the output shown as "malloc called 22 times..." > how does this output helps me to debug my prog... > > can someone help me on the proper usage of dtrace..... > > > This message posted from opensolaris.org > _______________________________________________ > opensolaris-discuss mailing list > opensolaris-discuss@opensolaris.org > _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org