diff options
author | Joseph Koshy <jkoshy@FreeBSD.org> | 2005-05-30 06:29:29 +0000 |
---|---|---|
committer | Joseph Koshy <jkoshy@FreeBSD.org> | 2005-05-30 06:29:29 +0000 |
commit | 36c0fd9d0fb62e50ec668ba7c50c5bffaf9464d6 (patch) | |
tree | 7e883bbffeb74552930e9883202ed3d7c3123a4a /sys/kern/kern_clock.c | |
parent | 95eca142ec1e8547a26a4a18d14842f36dcf9fc5 (diff) |
Kernel hooks to support PMC sampling modes.
Reviewed by: alc
Notes
Notes:
svn path=/head/; revision=146799
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 } /* |