Date: Thu, 16 Jan 2003 12:41:42 -0800 (PST) From: Brian Feldman <green@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 23801 for review Message-ID: <200301162041.h0GKfg2N051210@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=23801 Change 23801 by green@green_laptop_2 on 2003/01/16 12:41:30 Hardcode some SEBSD locks, which removes the warnings... Also, implement ddb.witness_backtrace to print backtraces along with all witness messages. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/kern/subr_witness.c#2 (text+ko) ==== @@ -170,6 +170,11 @@ #endif TUNABLE_INT("debug.witness_ddb", &witness_ddb); SYSCTL_INT(_debug, OID_AUTO, witness_ddb, CTLFLAG_RW, &witness_ddb, 0, ""); + +int witness_backtrace = 0; +TUNABLE_INT("debug.witness_backtrace", &witness_backtrace); +SYSCTL_INT(_debug, OID_AUTO, witness_backtrace, CTLFLAG_RW, &witness_backtrace, + 0, "Print a backtrace to the console along with the lock order violation itself."); #endif /* DDB */ #ifdef WITNESS_SKIPSPIN @@ -204,6 +209,8 @@ { "session", &lock_class_mtx_sleep }, { "uidinfo hash", &lock_class_mtx_sleep }, { "uidinfo struct", &lock_class_mtx_sleep }, + { "SEBSD AVC", &lock_class_mtx_sleep }, + { "SEBSD Policy Lock", &lock_class_sx }, { NULL, NULL }, /* * spin locks @@ -711,8 +718,12 @@ out: #ifdef DDB - if (witness_ddb && go_into_ddb) - Debugger(__func__); + if (go_into_ddb) { + if (witness_ddb) + Debugger(__func__); + else if (witness_backtrace) + db_print_backtrace(); + } #endif /* DDB */ w->w_file = file; w->w_line = line; @@ -938,8 +949,12 @@ goto again; } #ifdef DDB - if (witness_ddb && n) - Debugger(__func__); + if (n) { + if (witness_ddb) + Debugger(__func__); + else if (witness_backtrace) + db_print_backtrace(); + } #endif /* DDB */ return (n); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301162041.h0GKfg2N051210>