From owner-freebsd-current@FreeBSD.ORG Mon Mar 22 16:00:47 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF6F616A4F6 for ; Mon, 22 Mar 2004 16:00:46 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4724643D64 for ; Mon, 22 Mar 2004 16:00:35 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 5897 invoked from network); 23 Mar 2004 00:00:34 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Mar 2004 00:00:34 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i2N00V28000566; Mon, 22 Mar 2004 19:00:31 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Alfred Perlstein Date: Mon, 22 Mar 2004 19:02:15 -0500 User-Agent: KMail/1.6 References: <20040322222907.GS54769@elvis.mu.org> In-Reply-To: <20040322222907.GS54769@elvis.mu.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403221902.15293.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: current@freebsd.org Subject: Re: witness patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2004 00:00:47 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org