[m-rev.] for review: --debug-threads runtime option
Peter Ross
pro at missioncriticalit.com
Tue Mar 4 01:49:57 AEDT 2003
On Tue, Mar 04, 2003 at 12:38:26AM +1100, Fergus Henderson wrote:
> On 03-Mar-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> > Allow one to turn thread debugging on at runtime.
> > However only modules which are compiled with MR_DEBUG_THREADS will
> > have debugging messages output.
>
> Well, I'm not sure how useful this is. But at any rate that change looks
> mostly harmless. I do have some comments about the documentation,
> though.
>
It is very useful when one is trying to debug deadlock problems
(particularly prevalent because it is rare that foreign_procs are marked
thread_safe) without having to do a complete recompile (including
runtime and standard library).
> > +++ doc/user_guide.texi 3 Mar 2003 12:36:18 -0000
> > @@ -6754,6 +6754,13 @@
> > @c --mdb-in-window is for use only by the mdb script, so it's
> > @c not documented here.
> >
> > + at sp 1
> > + at itemx --debug-threads
>
> s/@itemx/@item/
>
> > + at findex --debug-threads (runtime option)
>
> Also add
> @cindex Debugging Threads
> @cindex Threads, Debugging
>
> > +Output information to stderr about the locking and unlocking occuring in each
> > +module which has been compiled with MR_DEBUG_THREADS defined.
>
> What's "stderr"?
> And is MR_DEBUG_THREADS supposed to be defined as a predicate or
> as a function? ;-)
>
> s/stderr/the standard error stream/
> s/MR_DEBUG_THREADS/the C macro symbol @samp{MR_DEBUG_THREADS}/
>
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.342.2.4
diff -u -r1.342.2.4 user_guide.texi
--- doc/user_guide.texi 1 Mar 2003 08:16:16 -0000 1.342.2.4
+++ doc/user_guide.texi 3 Mar 2003 14:46:12 -0000
@@ -6754,6 +6754,16 @@
@c --mdb-in-window is for use only by the mdb script, so it's
@c not documented here.
+ at sp 1
+ at item --debug-threads
+ at findex --debug-threads (runtime option)
+ at cindex Debugging Threads
+ at cindex Threads, Debugging
+
+Output information to the standard error stream about the locking and
+unlocking occuring in each module which has been compiled with the C macro
+symbol @samp{MR_DEBUG_THREADS} defined.
+
@end table
@sp 1
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list