summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-12-14 16:03:23 +0000
committeravg <avg@FreeBSD.org>2016-12-14 16:03:23 +0000
commitc4ce610aeaa6d50d093ec18897c3ab63b5f9e536 (patch)
tree91515e7823dd116a93f091e8974e7d1b25d30e6b
parent6d3cdf0ab519f1b7bad6bd132eda48242f0ff7c8 (diff)
downloadFreeBSD-src-c4ce610aeaa6d50d093ec18897c3ab63b5f9e536.zip
FreeBSD-src-c4ce610aeaa6d50d093ec18897c3ab63b5f9e536.tar.gz
MFC r308480: pmc_process_csw_out: ignore deleted counters
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 753b2f0..1cdc175 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -1432,8 +1432,8 @@ pmc_process_csw_out(struct thread *td)
* save the reading.
*/
- if (pp != NULL && pp->pp_pmcs[ri].pp_pmc != NULL) {
-
+ if (pm->pm_state != PMC_STATE_DELETED && pp != NULL &&
+ pp->pp_pmcs[ri].pp_pmc != NULL) {
KASSERT(pm == pp->pp_pmcs[ri].pp_pmc,
("[pmc,%d] pm %p != pp_pmcs[%d] %p", __LINE__,
pm, ri, pp->pp_pmcs[ri].pp_pmc));
OpenPOWER on IntegriCloud