diff options
| author | Joseph Koshy <jkoshy@FreeBSD.org> | 2005-07-30 09:02:42 +0000 |
|---|---|---|
| committer | Joseph Koshy <jkoshy@FreeBSD.org> | 2005-07-30 09:02:42 +0000 |
| commit | fadcc6e201b6c5dc3ef5b75e7627be7ec2179cd3 (patch) | |
| tree | b1d2d227bd805153039236ff8b34d8b262c0d401 /sys/kern/kern_pmc.c | |
| parent | 77d2ce5d21810b49be0b469cc4e4df685bf0749a (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_pmc.c')
| -rw-r--r-- | sys/kern/kern_pmc.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index 43059cc2a4d8..ed4de5950e48 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -26,10 +26,20 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_hwpmc_hooks.h" + +#include <sys/types.h> +#include <sys/pmc.h> #include <sys/pmckern.h> #include <sys/smp.h> -struct sx pmc_sx; +#if HWPMC_HOOKS +#define PMC_KERNEL_VERSION PMC_VERSION +#else +#define PMC_KERNEL_VERSION 0 +#endif + +const int pmc_kernel_version = PMC_KERNEL_VERSION; /* Hook variable. */ int (*pmc_hook)(struct thread *td, int function, void *arg) = NULL; @@ -37,13 +47,13 @@ int (*pmc_hook)(struct thread *td, int function, void *arg) = NULL; /* Interrupt handler */ int (*pmc_intr)(int cpu, uintptr_t pc, int usermode) = NULL; +/* Bitmask of CPUs requiring servicing at hardclock time */ volatile cpumask_t pmc_cpumask; /* * A global count of SS mode PMCs. When non-zero, this means that * we have processes that are sampling the system as a whole. */ - volatile int pmc_ss_count; /* @@ -55,14 +65,11 @@ volatile int pmc_ss_count; * shared (sx) lock -- thus making the process of calling into PMC(4) * somewhat more expensive than a simple 'if' check and indirect call. */ - - +struct sx pmc_sx; SX_SYSINIT(pmc, &pmc_sx, "pmc shared lock"); /* - * pmc_cpu_is_disabled - * - * return TRUE if the cpu specified has been disabled. + * Helper functions */ int |
