diff options
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_x86.c')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_x86.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c index 72ed518..e7485a4 100644 --- a/sys/dev/hwpmc/hwpmc_x86.c +++ b/sys/dev/hwpmc/hwpmc_x86.c @@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_param.h> #include <vm/pmap.h> +#include "hwpmc_soft.h" + /* * Attempt to walk a user call stack using a too-simple algorithm. * In the general case we need unwind information associated with @@ -251,8 +253,11 @@ pmc_md_initialize() /* disallow sampling if we do not have an LAPIC */ if (md != NULL && !lapic_enable_pmc()) - for (i = 1; i < md->pmd_nclass; i++) + for (i = 0; i < md->pmd_nclass; i++) { + if (i == PMC_CLASS_INDEX_SOFT) + continue; md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT; + } return (md); } |