[dtrace-discuss] Incorrect information showed by dtrace

James Dickens
Wed, 28 Feb 2007 13:09:48 -0000

On 2/28/07, Nilendra Jain <nilendra at avaya.com>
wrote:
>
> I am using dtrace to check memory leaks in my code. I have put probe
> points for malloc, calloc, realloc and free. It is basically for a
telephony
> product that I am working on.
>
> I started dtrace after running my process. The output produced by dtrace
> for one telephony call shows that one of my [b]initialization[/b] functions
> has been invoked 295 times. But it is an initialization function and it
gets
> called only once during the lifetime of a phone call. I have verified that
> by adding a log statement at the start of the function and checking the log
> output.
>
> I am not sure if the output of dtrace is wrong or I am not probing the
> right way ?


more information is needed to diagnose this problem, for example if this is
a java or C++ or other object oriented language it is possible that it is
calling malloc and friends repeatedly in the background for hidden
constructors and copy constructors.

You can also print out the userstack (ustack())  on each call and see in
which context its being called so you can track down how its being called,
of course if they are all identical it could be a DTrace error.

James Dickens
uadmin.blogspot.com



This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070228/4b94b3df/attachment.html>