Date: Mon, 22 Mar 2004 19:02:15 -0500 From: John Baldwin <jhb@FreeBSD.org> To: Alfred Perlstein <alfred@freebsd.org> Cc: current@freebsd.org Subject: Re: witness patch Message-ID: <200403221902.15293.jhb@FreeBSD.org> In-Reply-To: <20040322222907.GS54769@elvis.mu.org> References: <20040322222907.GS54769@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 22 March 2004 05:29 pm, Alfred Perlstein wrote: > This gives a traceback when witness_warn() is called like when > we get a lock order reversal in witness_checkorder(). > > Please review or commit. Looks ok. If you want to match what witness_checkorder() does, you can make it do 'if (n) { if (trace) backtrace(); if (ddb) Debugger(); }', but I actually prefer what you did. I wouldn't mind if you made the witness_checkorder() code do the same in fact (i.e., don't dump the trace if we are going to drop into the debugger anyways), > Index: subr_witness.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/subr_witness.c,v > retrieving revision 1.170 > diff -u -r1.170 subr_witness.c > --- subr_witness.c 27 Feb 2004 18:33:09 -0000 1.170 > +++ subr_witness.c 15 Mar 2004 09:47:45 -0000 > @@ -1150,6 +1150,8 @@ > #ifdef DDB > else if (witness_ddb && n) > Debugger(__func__); > + else if (witness_trace && n) > + backtrace(); > #endif > return (n); > } -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403221902.15293.jhb>