summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat/pmcstat_log.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-08-07 18:37:05 +0000
committerattilio <attilio@FreeBSD.org>2011-08-07 18:37:05 +0000
commit18728bba7168d9fe3ad61b25beaa7a8c9bc10664 (patch)
treeae555cee6f8bd0c9014e1f72795900cc72b5f198 /usr.sbin/pmcstat/pmcstat_log.c
parentd5a429b2e4110c4c333667ce5db2f6b094707707 (diff)
downloadFreeBSD-src-18728bba7168d9fe3ad61b25beaa7a8c9bc10664.zip
FreeBSD-src-18728bba7168d9fe3ad61b25beaa7a8c9bc10664.tar.gz
Convert pmcstat about using cpuset_t rather than relying on plain 32 bit
ints. That fixes a first bug where pmcstat wasn't using the old cpumask_t interface and now also brings the full support for more than 32 cpus. While here, make the functions pmcstat_clone_event_descriptor() and pmcstat_get_cpumask() private to pmcstat. The problem of assuming cpu dense masks still persists and should be eventually fixed, as reported by avg. Tested by: pluknet Reviewed by: gnn Approved by: re (kib)
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat_log.c')
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c
index bebe945..b7dc956 100644
--- a/usr.sbin/pmcstat/pmcstat_log.c
+++ b/usr.sbin/pmcstat/pmcstat_log.c
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/endian.h>
+#include <sys/cpuset.h>
#include <sys/gmon.h>
#include <sys/imgact_aout.h>
#include <sys/imgact_elf.h>
@@ -1435,7 +1436,7 @@ pmcstat_analyze_log(void)
cpu = PMC_CALLCHAIN_CPUFLAGS_TO_CPU(cpuflags);
/* Filter on the CPU id. */
- if ((args.pa_cpumask & (1 << cpu)) == 0) {
+ if (!CPU_ISSET(cpu, &(args.pa_cpumask))) {
pmcstat_stats.ps_samples_skipped++;
break;
}
OpenPOWER on IntegriCloud