aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Mashtizadeh <mashti@uwaterloo.ca>2026-03-16 23:39:15 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2026-03-16 23:39:15 +0000
commit209d9fbe50c181701bafb16a16dca8c959bbe8ae (patch)
tree6750103d932f0a4fab5b38e0062909ba63f67245
parent44a983d249d05d932b6cff333f130baf70febc22 (diff)
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
-rw-r--r--usr.sbin/pmcstat/pmcstat.c7
1 files 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);
/*