diff options
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 148da2b..c04aa30 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -32,6 +32,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_ktrace.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/limits.h> @@ -54,6 +56,9 @@ __FBSDID("$FreeBSD$"); #include <sys/timers.h> #include <sys/timetc.h> #include <sys/vnode.h> +#ifdef KTRACE +#include <sys/ktrace.h> +#endif #include <vm/vm.h> #include <vm/vm_extern.h> @@ -701,6 +706,10 @@ kern_getitimer(struct thread *td, u_int which, struct itimerval *aitv) *aitv = p->p_stats->p_timer[which]; PROC_ITIMUNLOCK(p); } +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktritimerval(aitv); +#endif return (0); } @@ -742,6 +751,10 @@ kern_setitimer(struct thread *td, u_int which, struct itimerval *aitv, if (which > ITIMER_PROF) return (EINVAL); +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktritimerval(aitv); +#endif if (itimerfix(&aitv->it_value) || aitv->it_value.tv_sec > INT32_MAX / 2) return (EINVAL); @@ -786,6 +799,10 @@ kern_setitimer(struct thread *td, u_int which, struct itimerval *aitv, p->p_stats->p_timer[which] = *aitv; PROC_ITIMUNLOCK(p); } +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktritimerval(oitv); +#endif return (0); } |