summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemy Noel <mocramis@gmail.com>2018-05-04 01:18:35 +0200
committerRemy Noel <mocramis@gmail.com>2018-05-04 01:18:35 +0200
commitc0db3d8d70ce39f3dfc605c4989d4b17d32db394 (patch)
tree2f94cbc4a48653553c64d431c9fb5b392ac0b768
parentdbf7c70e04a4f05f90d99d466eaad1932b0e0460 (diff)
perfmon: fix broken global pmc counting.HEADperfmon
When a pmc was freed, the total amount of pmc was not decreased.
-rw-r--r--kern/perfmon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kern/perfmon.c b/kern/perfmon.c
index c910069..788cf14 100644
--- a/kern/perfmon.c
+++ b/kern/perfmon.c
@@ -357,6 +357,7 @@ perfmon_pmc_put(struct perfmon_pmc *pmc)
if (pmc->nr_refs == 0) {
pmu_driver.ops.free(pmc->id);
+ perfmon_pmu.nr_pmcs--;
assert(perfmon_pmc_id_to_index[pmc->id] != UINT32_MAX);
perfmon_pmc_id_to_index[pmc->id] = UINT32_MAX;
}