summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pmcstat/pmcstat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 8cbe55b..228c78d 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -145,6 +145,9 @@ pmcstat_cleanup(struct pmcstat_args *a)
/* release allocated PMCs. */
STAILQ_FOREACH_SAFE(ev, &a->pa_events, ev_next, tmp)
if (ev->ev_pmcid != PMC_ID_INVALID) {
+ if (pmc_stop(ev->ev_pmcid) < 0)
+ err(EX_OSERR, "ERROR: cannot stop pmc 0x%x "
+ "\"%s\"", ev->ev_pmcid, ev->ev_name);
if (pmc_release(ev->ev_pmcid) < 0)
err(EX_OSERR, "ERROR: cannot release pmc "
"0x%x \"%s\"", ev->ev_pmcid, ev->ev_name);
OpenPOWER on IntegriCloud