diff options
author | njl <njl@FreeBSD.org> | 2005-12-18 18:10:57 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-12-18 18:10:57 +0000 |
commit | 731935d9f8fba5dcb8be1ff5f577f5ced737a5d1 (patch) | |
tree | 8e2ed11e214950e0f628e5e6890f5bd9b34a5587 | |
parent | b8a039f36faf51e392684cbb8334a05c24b9c146 (diff) | |
download | FreeBSD-src-731935d9f8fba5dcb8be1ff5f577f5ced737a5d1.zip FreeBSD-src-731935d9f8fba5dcb8be1ff5f577f5ced737a5d1.tar.gz |
Restore KTR_CRITICAL but conditionally compile it in as KTR_SCHED.
Requested by: scottl, jhb
-rw-r--r-- | sys/kern/kern_switch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 3a5641a..c8b3629 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -109,6 +109,13 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #endif +/* Uncomment this to enable logging of critical_enter/exit. */ +#if 0 +#define KTR_CRITICAL KTR_SCHED +#else +#define KTR_CRITICAL 0 +#endif + #ifdef FULL_PREEMPTION #ifndef PREEMPTION #error "The FULL_PREEMPTION option requires the PREEMPTION option" @@ -597,7 +604,7 @@ critical_enter(void) td = curthread; td->td_critnest++; - CTR4(KTR_CONTENTION, "critical_enter by thread %p (%ld, %s) to %d", td, + CTR4(KTR_CRITICAL, "critical_enter by thread %p (%ld, %s) to %d", td, (long)td->td_proc->p_pid, td->td_proc->p_comm, td->td_critnest); } @@ -625,7 +632,7 @@ critical_exit(void) td->td_critnest--; - CTR4(KTR_CONTENTION, "critical_exit by thread %p (%ld, %s) to %d", td, + CTR4(KTR_CRITICAL, "critical_exit by thread %p (%ld, %s) to %d", td, (long)td->td_proc->p_pid, td->td_proc->p_comm, td->td_critnest); } |