diff options
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 4ac211df140c..070d459cfc1e 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -69,6 +69,10 @@ __FBSDID("$FreeBSD$"); #include <sys/gmon.h> #endif +#ifdef HWPMC_HOOKS +#include <sys/pmckern.h> +#endif + #ifdef DEVICE_POLLING extern void hardclock_device_poll(void); #endif /* DEVICE_POLLING */ @@ -191,6 +195,11 @@ hardclock_process(frame) } } mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); + +#ifdef HWPMC_HOOKS + if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid))) + PMC_CALL_HOOK_UNLOCKED(curthread, PMC_FN_DO_SAMPLES, NULL); +#endif } /* |