summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-06 21:49:00 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-06 21:49:00 +0000
commit36a8fef8a8b749d8e9cc28e3718c9964045fcb12 (patch)
tree89ced1658d0ba5128be32083e3b0f6fa8a8d2131 /sys/kern
parentfadae90e4a8f205626134be85ce57db1fc381c46 (diff)
downloadFreeBSD-src-36a8fef8a8b749d8e9cc28e3718c9964045fcb12.zip
FreeBSD-src-36a8fef8a8b749d8e9cc28e3718c9964045fcb12.tar.gz
Cut a KTR record whenever a callout is invoked. Mark whether it runs
with Giant or not, and include the function point so it can be looked up against the kernel symbol table during trace analysis.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_timeout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index eac675b..a516a7d 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/callout.h>
#include <sys/condvar.h>
#include <sys/kernel.h>
+#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysctl.h>
@@ -245,8 +246,11 @@ softclock(void *dummy)
if (!(c_flags & CALLOUT_MPSAFE)) {
mtx_lock(&Giant);
gcalls++;
+ CTR1(KTR_CALLOUT, "callout %p", c_func);
} else {
mpcalls++;
+ CTR1(KTR_CALLOUT, "callout mpsafe %p",
+ c_func);
}
#ifdef DIAGNOSTIC
binuptime(&bt1);
OpenPOWER on IntegriCloud