diff options
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_mod.c')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index cb8ed37..1a19c4b 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -173,7 +173,7 @@ static struct pmc_classdep **pmc_rowindex_to_classdep; * Prototypes */ -#ifdef DEBUG +#ifdef HWPMC_DEBUG static int pmc_debugflags_sysctl_handler(SYSCTL_HANDLER_ARGS); static int pmc_debugflags_parse(char *newstr, char *fence); #endif @@ -238,7 +238,7 @@ static int pmc_callchaindepth = PMC_CALLCHAIN_DEPTH; SYSCTL_INT(_kern_hwpmc, OID_AUTO, callchaindepth, CTLFLAG_RDTUN, &pmc_callchaindepth, 0, "depth of call chain records"); -#ifdef DEBUG +#ifdef HWPMC_DEBUG struct pmc_debugflags pmc_debugflags = PMC_DEBUG_DEFAULT_FLAGS; char pmc_debugstr[PMC_DEBUG_STRSIZE]; TUNABLE_STR(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, @@ -337,7 +337,7 @@ static moduledata_t pmc_mod = { DECLARE_MODULE(pmc, pmc_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_VERSION(pmc, PMC_VERSION); -#ifdef DEBUG +#ifdef HWPMC_DEBUG enum pmc_dbgparse_state { PMCDS_WS, /* in whitespace */ PMCDS_MAJOR, /* seen a major keyword */ @@ -816,7 +816,7 @@ pmc_link_target_process(struct pmc *pm, struct pmc_process *pp) PMCDBG(PRC,TLK,1, "link-target pmc=%p ri=%d pmc-process=%p", pm, ri, pp); -#ifdef DEBUG +#ifdef HWPMC_DEBUG LIST_FOREACH(pt, &pm->pm_targets, pt_next) if (pt->pt_process == pp) KASSERT(0, ("[pmc,%d] pp %p already in pmc %p targets", @@ -1784,7 +1784,7 @@ pmc_log_all_process_mappings(struct pmc_owner *po) */ -#ifdef DEBUG +#ifdef HWPMC_DEBUG const char *pmc_hooknames[] = { /* these strings correspond to PMC_FN_* in <sys/pmckern.h> */ "", @@ -2002,7 +2002,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg) break; default: -#ifdef DEBUG +#ifdef HWPMC_DEBUG KASSERT(0, ("[pmc,%d] unknown hook %d\n", __LINE__, function)); #endif break; @@ -2185,7 +2185,7 @@ pmc_destroy_pmc_descriptor(struct pmc *pm) static void pmc_wait_for_pmc_idle(struct pmc *pm) { -#ifdef DEBUG +#ifdef HWPMC_DEBUG volatile int maxloop; maxloop = 100 * pmc_cpu_max(); @@ -2195,7 +2195,7 @@ pmc_wait_for_pmc_idle(struct pmc *pm) * comes down to zero. */ while (atomic_load_acq_32(&pm->pm_runcount) > 0) { -#ifdef DEBUG +#ifdef HWPMC_DEBUG maxloop--; KASSERT(maxloop > 0, ("[pmc,%d] (ri%d, rc%d) waiting too long for " @@ -2759,7 +2759,7 @@ pmc_stop(struct pmc *pm) } -#ifdef DEBUG +#ifdef HWPMC_DEBUG static const char *pmc_op_to_name[] = { #undef __PMC_OP #define __PMC_OP(N, D) #N , @@ -3798,7 +3798,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args) pprw = (struct pmc_op_pmcrw *) arg; -#ifdef DEBUG +#ifdef HWPMC_DEBUG if (prw.pm_flags & PMC_F_NEWVALUE) PMCDBG(PMC,OPS,2, "rw id=%d new %jx -> old %jx", ri, prw.pm_value, oldvalue); @@ -4712,7 +4712,7 @@ pmc_initialize(void) md = NULL; error = 0; -#ifdef DEBUG +#ifdef HWPMC_DEBUG /* parse debug flags first */ if (TUNABLE_STR_FETCH(PMC_SYSCTL_NAME_PREFIX "debugflags", pmc_debugstr, sizeof(pmc_debugstr))) @@ -4933,7 +4933,7 @@ pmc_cleanup(void) struct pmc_ownerhash *ph; struct pmc_owner *po, *tmp; struct pmc_binding pb; -#ifdef DEBUG +#ifdef HWPMC_DEBUG struct pmc_processhash *prh; #endif @@ -4985,7 +4985,7 @@ pmc_cleanup(void) mtx_destroy(&pmc_processhash_mtx); if (pmc_processhash) { -#ifdef DEBUG +#ifdef HWPMC_DEBUG struct pmc_process *pp; PMCDBG(MOD,INI,3, "%s", "destroy process hash"); |