Date: Thu, 27 Jul 2006 21:51:07 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102611 for review Message-ID: <200607272151.k6RLp74U031405@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607272151.k6RLp74U031405>