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.
This commit is contained in:
rwatson 2004-08-06 21:49:00 +00:00
parent fadae90e4a
commit 36a8fef8a8

View File

@ -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);