aboutsummaryrefslogtreecommitdiff
path: root/lib/libpmcstat
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2018-01-16 09:31:01 +0000
committerRuslan Bukin <br@FreeBSD.org>2018-01-16 09:31:01 +0000
commit167b8a609df9e746e67cf34a54bdef9f1627d49c (patch)
tree1a18ce126407358b445d0e52b91ad90e257ba173 /lib/libpmcstat
parent8fc8068ebae97a5d793d63037152f6627208ca13 (diff)
downloadsrc-167b8a609df9e746e67cf34a54bdef9f1627d49c.tar.gz
src-167b8a609df9e746e67cf34a54bdef9f1627d49c.zip
Fix bug: increment the value of pmcstat_npmcs instead of moving pointer
to the next int position. Bug was introduced in r324959 ("Extract a set of pmcstat functions and interfaces to the new internal library -- libpmcstat.") This fixes pmcstat top mode (-T) operation. Example: pmcstat -n1 -S clock.hard -T Reported by: Peter Holm <peter@holm.cc> Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=328044
Diffstat (limited to 'lib/libpmcstat')
-rw-r--r--lib/libpmcstat/libpmcstat_logging.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpmcstat/libpmcstat_logging.c b/lib/libpmcstat/libpmcstat_logging.c
index d86762f38bb8..a77a326b9ab5 100644
--- a/lib/libpmcstat/libpmcstat_logging.c
+++ b/lib/libpmcstat/libpmcstat_logging.c
@@ -101,7 +101,7 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcstat_interned_string ps,
pr->pr_pmcid = pmcid;
pr->pr_pmcname = ps;
- pr->pr_pmcin = *pmcstat_npmcs++;
+ pr->pr_pmcin = (*pmcstat_npmcs)++;
pr->pr_samples = 0;
pr->pr_dubious_frames = 0;
pr->pr_merge = prm == NULL ? pr : prm;