Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2018 21:42:22 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334641 - head/usr.sbin/pmc
Message-ID:  <201806042142.w54LgMGj099343@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmacy
Date: Mon Jun  4 21:42:21 2018
New Revision: 334641
URL: https://svnweb.freebsd.org/changeset/base/334641

Log:
  pmc stat: fix offset of specified counter

Modified:
  head/usr.sbin/pmc/cmd_pmc_stat.c   (contents, props changed)

Modified: head/usr.sbin/pmc/cmd_pmc_stat.c
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_stat.c	Mon Jun  4 21:21:55 2018	(r334640)
+++ head/usr.sbin/pmc/cmd_pmc_stat.c	Mon Jun  4 21:42:21 2018	(r334641)
@@ -86,6 +86,7 @@ getstathz(void)
 }
 
 #define STAT_MODE_NPMCS 6
+#define FIXED_MODE_NPMCS 2
 static struct timespec before_ts;
 #define CYCLES		0
 #define INST		1
@@ -179,7 +180,7 @@ pmc_stat_setup_stat(int system_mode, const char *arg)
 			if (pmc_pmu_sample_rate_get(counter) == DEFAULT_SAMPLE_COUNT)
 				errx(EX_USAGE, "ERROR: %s not recognized on host", counter);
 		}
-		start = IAP_START + STAT_MODE_NPMCS - newcnt;
+		start = IAP_START + STAT_MODE_NPMCS - FIXED_MODE_NPMCS - newcnt;
 		for (i = 0; i < newcnt; i++) {
 			stat_mode_cntrs[start + i] = new_cntrs[i];
 			stat_mode_names[start + i] = new_cntrs[i];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806042142.w54LgMGj099343>