Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_mod.c
Show All 12 Lines | |||||
static void pmc_process_proccreate(struct proc *p); | static void pmc_process_proccreate(struct proc *p); | ||||
static void pmc_process_allproc(struct pmc *pm); | static void pmc_process_allproc(struct pmc *pm); | ||||
/* | /* | ||||
* Kernel tunables and sysctl(8) interface. | * Kernel tunables and sysctl(8) interface. | ||||
*/ | */ | ||||
SYSCTL_DECL(_kern_hwpmc); | SYSCTL_DECL(_kern_hwpmc); | ||||
SYSCTL_NODE(_kern_hwpmc, OID_AUTO, stats, CTLFLAG_RW, 0, "HWPMC stats"); | SYSCTL_NODE(_kern_hwpmc, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"HWPMC stats"); | |||||
/* Stats. */ | /* Stats. */ | ||||
SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_ignored, CTLFLAG_RW, | SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_ignored, CTLFLAG_RW, | ||||
&pmc_stats.pm_intr_ignored, "# of interrupts ignored"); | &pmc_stats.pm_intr_ignored, "# of interrupts ignored"); | ||||
SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_processed, CTLFLAG_RW, | SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_processed, CTLFLAG_RW, | ||||
&pmc_stats.pm_intr_processed, "# of interrupts processed"); | &pmc_stats.pm_intr_processed, "# of interrupts processed"); | ||||
SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_bufferfull, CTLFLAG_RW, | SYSCTL_COUNTER_U64(_kern_hwpmc_stats, OID_AUTO, intr_bufferfull, CTLFLAG_RW, | ||||
Show All 21 Lines | |||||
SYSCTL_STRING(_kern_hwpmc, OID_AUTO, cpuid, CTLFLAG_RD, | SYSCTL_STRING(_kern_hwpmc, OID_AUTO, cpuid, CTLFLAG_RD, | ||||
pmc_cpuid, 0, "cpu version string"); | pmc_cpuid, 0, "cpu version string"); | ||||
#ifdef HWPMC_DEBUG | #ifdef HWPMC_DEBUG | ||||
struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS; | struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS; | ||||
char pmc_debugstr[PMC_DEBUG_STRSIZE]; | char pmc_debugstr[PMC_DEBUG_STRSIZE]; | ||||
TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, | TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, | ||||
sizeof(pmc_debugstr)); | sizeof(pmc_debugstr)); | ||||
SYSCTL_PROC(_kern_hwpmc, OID_AUTO, debugflags, | SYSCTL_PROC(_kern_hwpmc, OID_AUTO, debugflags, | ||||
CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, | CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_NEEDGIANT, | ||||
0, 0, pmc_debugflags_sysctl_handler, "A", "debug flags"); | 0, 0, pmc_debugflags_sysctl_handler, "A", | ||||
"debug flags"); | |||||
#endif | #endif | ||||
/* | /* | ||||
* kern.hwpmc.hashrows -- determines the number of rows in the | * kern.hwpmc.hashrows -- determines the number of rows in the | ||||
* of the hash table used to look up threads | * of the hash table used to look up threads | ||||
*/ | */ | ||||
Show All 12 Lines |