From 36a8fef8a8b749d8e9cc28e3718c9964045fcb12 Mon Sep 17 00:00:00 2001 From: rwatson Date: Fri, 6 Aug 2004 21:49:00 +0000 Subject: 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. --- sys/kern/kern_timeout.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/kern') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.1