From owner-p4-projects@FreeBSD.ORG Thu Jul 27 21:51:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A278D16A4DE; Thu, 27 Jul 2006 21:51:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DC0A16A4DD for ; Thu, 27 Jul 2006 21:51:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F18FE43D55 for ; Thu, 27 Jul 2006 21:51:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6RLp7CS031408 for ; Thu, 27 Jul 2006 21:51:07 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6RLp74U031405 for perforce@freebsd.org; Thu, 27 Jul 2006 21:51:07 GMT (envelope-from jhb@freebsd.org) Date: Thu, 27 Jul 2006 21:51:07 GMT Message-Id: <200607272151.k6RLp74U031405@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 102611 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2006 21:51:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=102611 Change 102611 by jhb@jhb_mutex on 2006/07/27 21:50:18 Let WITNESS have the first crack at checking for leaked locks as it can provide much more detailed information if it is present. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/trap.c#47 edit .. //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#17 edit .. //depot/projects/smpng/sys/arm/arm/trap.c#20 edit .. //depot/projects/smpng/sys/i386/i386/trap.c#96 edit .. //depot/projects/smpng/sys/ia64/ia32/ia32_trap.c#13 edit .. //depot/projects/smpng/sys/ia64/ia64/trap.c#84 edit .. //depot/projects/smpng/sys/powerpc/powerpc/trap.c#53 edit .. //depot/projects/smpng/sys/sparc64/sparc64/trap.c#69 edit Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/trap.c#47 (text+ko) ==== @@ -874,6 +874,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -881,8 +883,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); /* * Handle reschedule and other end-of-syscall issues ==== //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#17 (text+ko) ==== @@ -246,6 +246,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???")); @@ -253,8 +255,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); /* * Handle reschedule and other end-of-syscall issues ==== //depot/projects/smpng/sys/arm/arm/trap.c#20 (text+ko) ==== @@ -981,6 +981,8 @@ if (locked && (callp->sy_narg & SYF_MPSAFE) == 0) mtx_unlock(&Giant); + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -988,8 +990,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, ==== //depot/projects/smpng/sys/i386/i386/trap.c#96 (text+ko) ==== @@ -1065,6 +1065,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -1072,8 +1074,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); /* * Handle reschedule and other end-of-syscall issues ==== //depot/projects/smpng/sys/ia64/ia32/ia32_trap.c#13 (text+ko) ==== @@ -183,6 +183,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -190,8 +192,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); /* * End of syscall tracing. ==== //depot/projects/smpng/sys/ia64/ia64/trap.c#84 (text+ko) ==== @@ -1049,6 +1049,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -1056,8 +1058,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); /* * Handle reschedule and other end-of-syscall issues ==== //depot/projects/smpng/sys/powerpc/powerpc/trap.c#53 (text+ko) ==== @@ -473,6 +473,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -480,8 +482,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) ==== //depot/projects/smpng/sys/sparc64/sparc64/trap.c#69 (text+ko) ==== @@ -650,6 +650,8 @@ /* * Check for misbehavior. */ + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); @@ -657,8 +659,6 @@ ("System call %s returning with %d locks held", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", td->td_locks)); - WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); /* * Handle reschedule and other end-of-syscall issues