Hi It seems dtrace is the recommended tool for tracing C/C++ multithread app. But any Guide Line/example/Blogs for dtrace in debuging multithread app? It seems we could trace some current thread struct, tid. But how to use it to find the bug inside? Any guide will be appreciated. Regards Wynne
Hi,> It seems dtrace is the recommended tool for tracing C/C++ multithread app. > > But any Guide Line/example/Blogs for dtrace in debuging multithread app? > It seems we could trace some current thread struct, tid. But how to use it to > find the bug inside?I''m afraid that the question is too broad to answer it generally :) What kind of bug are you facing ? -- Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 193 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080507/21d94589/attachment.bin>
Wynne Wang wrote:> Hi > > It seems dtrace is the recommended tool for tracing C/C++ multithread app. > > But any Guide Line/example/Blogs for dtrace in debuging multithread app? > It seems we could trace some current thread struct, tid. But how to use it to > find the bug inside? >What kind of bug : Memory corruption / Hang / Core / Dog slow ? DTrace itself doesn''t tell you where the bug is - it lets you collect _proper_ data that empowers you to figure where the bug is.> Any guide will be appreciated. > > Regards > > Wynne > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Hmm, my first reflex would be to look into speculative tracing, triggered by the conditions that may trigger the bug. On Wed, May 7, 2008 at 4:29 AM, Wynne Wang <Wynne.Wang at sun.com> wrote:> Hi > > It seems dtrace is the recommended tool for tracing C/C++ multithread app. > > But any Guide Line/example/Blogs for dtrace in debuging multithread app? > It seems we could trace some current thread struct, tid. But how to use it to > find the bug inside? > > Any guide will be appreciated. > > Regards > > Wynne > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-- H. Lally Singh Ph.D. Candidate, Computer Science Virginia Tech
Andreas.Haas at Sun.COM
2008-May-07 11:26 UTC
[dtrace-discuss] Dtrace for multithread debugging
Hi Wynne,
under
http://wiki.gridengine.info/wiki/index.php/Dtrace
there is a description of a monitoring utility that collects and prints
performance indices of a multi-process + multi-threaded daemon (pure C)
component that bases solely on Dtrace pid-provider. Despite the caveat
that traced functions may not have been inlined by the compiler, it works
quite well, because function inlining can almost always be prevented with
corresponding #pragma compliler directives.
Already having this monitoring utility helped me to find lots of bugs
that had been hard to find otherwise. In addition there are also cases
where I customize the D-script as to debug deeper into bugs where timing
conditions play a role somehow.
Regards,
Andreas
PS: The wiki document also contains a link where you could download the
deamon monitor for a version of our product where the monitor was not
yet part of our regular distribution. Reason for making it part of our
distribution was the need to have the monitor available on-site.
On Wed, 7 May 2008, Lally Singh wrote:
> Hmm, my first reflex would be to look into speculative tracing,
> triggered by the conditions that may trigger the bug.
>
> On Wed, May 7, 2008 at 4:29 AM, Wynne Wang <Wynne.Wang at sun.com>
wrote:
>> Hi
>>
>> It seems dtrace is the recommended tool for tracing C/C++ multithread
app.
>>
>> But any Guide Line/example/Blogs for dtrace in debuging multithread
app?
>> It seems we could trace some current thread struct, tid. But how to
use it to
>> find the bug inside?
>>
>> Any guide will be appreciated.
>>
>> Regards
>>
>> Wynne
>>
>>
>> _______________________________________________
>> dtrace-discuss mailing list
>> dtrace-discuss at opensolaris.org
>>
>
>
>
> --
> H. Lally Singh
> Ph.D. Candidate, Computer Science
> Virginia Tech
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>
http://gridengine.info/
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551
Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering