aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hwpmc
diff options
context:
space:
mode:
authorFabien Thomas <fabient@FreeBSD.org>2009-12-01 23:01:59 +0000
committerFabien Thomas <fabient@FreeBSD.org>2009-12-01 23:01:59 +0000
commit01518b8c6f4632f28dbea8c403c9a2dfe6574ac9 (patch)
treeb79942e00e98819091dc757554d298e8c1b40eb8 /sys/dev/hwpmc
parent8c4a1234771cb5661ec42ef81485a3be2e758ab6 (diff)
Notes
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 768617477f3b..29568b0df0e3 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -793,7 +793,7 @@ pmc_link_target_process(struct pmc *pm, struct pmc_process *pp)
KASSERT(PMC_IS_VIRTUAL_MODE(PMC_TO_MODE(pm)),
("[pmc,%d] Attaching a non-process-virtual pmc=%p to pid=%d",
__LINE__, pm, pp->pp_proc->p_pid));
- KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < ((int) md->pmd_npmc - 1),
+ KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= ((int) md->pmd_npmc - 1),
("[pmc,%d] Illegal reference count %d for process record %p",
__LINE__, pp->pp_refcnt, (void *) pp));
@@ -846,7 +846,7 @@ pmc_unlink_target_process(struct pmc *pm, struct pmc_process *pp)
KASSERT(pm != NULL && pp != NULL,
("[pmc,%d] Null pm %p or pp %p", __LINE__, pm, pp));
- KASSERT(pp->pp_refcnt >= 1 && pp->pp_refcnt < (int) md->pmd_npmc,
+ KASSERT(pp->pp_refcnt >= 1 && pp->pp_refcnt <= (int) md->pmd_npmc,
("[pmc,%d] Illegal ref count %d on process record %p",
__LINE__, pp->pp_refcnt, (void *) pp));
@@ -1113,7 +1113,7 @@ pmc_detach_one_process(struct proc *p, struct pmc *pm, int flags)
* descriptor from the target hash table and unset the P_HWPMC
* flag in the struct proc.
*/
- KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < (int) md->pmd_npmc,
+ KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= (int) md->pmd_npmc,
("[pmc,%d] Illegal refcnt %d for process struct %p",
__LINE__, pp->pp_refcnt, pp));
@@ -1788,7 +1788,7 @@ pmc_hook_handler(struct thread *td, int function, void *arg)
pmc_detach_one_process(td->td_proc,
pm, PMC_FLAG_NONE);
- KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt < (int) md->pmd_npmc,
+ KASSERT(pp->pp_refcnt >= 0 && pp->pp_refcnt <= (int) md->pmd_npmc,
("[pmc,%d] Illegal ref count %d on pp %p", __LINE__,
pp->pp_refcnt, pp));