Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2026 23:39:47 +0000
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Ali Mashtizadeh <mashti@uwaterloo.ca>
Subject:   git: 209d9fbe50c1 - main - pmcstat: Implement PMC_CAP_SYSWIDE
Message-ID:  <69b894c3.21baf.3fedd4bb@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=209d9fbe50c181701bafb16a16dca8c959bbe8ae

commit 209d9fbe50c181701bafb16a16dca8c959bbe8ae
Author:     Ali Mashtizadeh <mashti@uwaterloo.ca>
AuthorDate: 2026-03-16 23:39:15 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-03-16 23:39:15 +0000

    pmcstat: Implement PMC_CAP_SYSWIDE
    
    Implement the PMC_CAP_SYSWIDE capability flag in the same manner as the
    PMC_CAP_DOMWIDE flag.  This flag was previously introduced along side
    the domain wide flag, but is yet to be used anywhere.
    
    Reviewed by:    mhorne
    Sponsored by:   Netflix
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/2075
---
 usr.sbin/pmcstat/pmcstat.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 1809dae7bc4c..a78062a5b6e0 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -739,8 +739,11 @@ main(int argc, char **argv)
 
 			STAILQ_INSERT_TAIL(&args.pa_events, ev, ev_next);
 
-			if ((caps & PMC_CAP_SYSWIDE) == PMC_CAP_SYSWIDE)
-				break;
+			if ((caps & PMC_CAP_SYSWIDE) == PMC_CAP_SYSWIDE) {
+				CPU_ZERO(&cpumask);
+				CPU_SET(0, &cpumask);
+				args.pa_flags |= FLAGS_HAS_CPUMASK;
+			}
 			if ((caps & PMC_CAP_DOMWIDE) == PMC_CAP_DOMWIDE) {
 				CPU_ZERO(&cpumask);
 				/*


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69b894c3.21baf.3fedd4bb>