diff options
author | Nate Lawson <njl@FreeBSD.org> | 2005-12-18 18:10:57 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2005-12-18 18:10:57 +0000 |
commit | 1335c4df323ab5b5a85097db0c9211c4c6f7a722 (patch) | |
tree | 8e2ed11e214950e0f628e5e6890f5bd9b34a5587 | |
parent | 1e558b7ecbca55f7a016ae7c9a300ec4fda79855 (diff) | |
download | src-1335c4df323ab5b5a85097db0c9211c4c6f7a722.tar.gz src-1335c4df323ab5b5a85097db0c9211c4c6f7a722.zip |
Restore KTR_CRITICAL but conditionally compile it in as KTR_SCHED.
Requested by: scottl, jhb
Notes
Notes:
svn path=/head/; revision=153510
-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 3a5641ac825d..c8b362984f45 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); } |