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 > _at__at_ -1150,6 +1150,8 _at__at_ > #ifdef DDB > else if (witness_ddb && n) > Debugger(__func__); > + else if (witness_trace && n) > + backtrace(); > #endif > return (n); > } -- John Baldwin <jhb_at_FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.orgReceived on Mon Mar 22 2004 - 15:00:47 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC