svn commit: r328044 - head/lib/libpmcstat
Ruslan Bukin
br at FreeBSD.org
Tue Jan 16 09:31:03 UTC 2018
Author: br
Date: Tue Jan 16 09:31:01 2018
New Revision: 328044
URL: https://svnweb.freebsd.org/changeset/base/328044
Log:
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 at holm.cc>
Sponsored by: DARPA, AFRL
Modified:
head/lib/libpmcstat/libpmcstat_logging.c
Modified: head/lib/libpmcstat/libpmcstat_logging.c
==============================================================================
--- head/lib/libpmcstat/libpmcstat_logging.c Tue Jan 16 08:00:07 2018 (r328043)
+++ head/lib/libpmcstat/libpmcstat_logging.c Tue Jan 16 09:31:01 2018 (r328044)
@@ -101,7 +101,7 @@ pmcstat_pmcid_add(pmc_id_t pmcid, pmcstat_interned_str
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;
More information about the svn-src-all
mailing list