summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmccontrol
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2005-06-09 19:45:09 +0000
committerjkoshy <jkoshy@FreeBSD.org>2005-06-09 19:45:09 +0000
commit1d3209ab83aac3089f15e00934e922d222a4ecf0 (patch)
tree4970329c2802c6329dd4f6e781d84b27dbf8f412 /usr.sbin/pmccontrol
parent4421a087425df7cc08a5671152d0ec7410bdb33e (diff)
downloadFreeBSD-src-1d3209ab83aac3089f15e00934e922d222a4ecf0.zip
FreeBSD-src-1d3209ab83aac3089f15e00934e922d222a4ecf0.tar.gz
MFP4:
- Implement sampling modes and logging support in hwpmc(4). - Separate MI and MD parts of hwpmc(4) and allow sharing of PMC implementations across different architectures. Add support for P4 (EMT64) style PMCs to the amd64 code. - New pmcstat(8) options: -E (exit time counts) -W (counts every context switch), -R (print log file). - pmc(3) API changes, improve our ability to keep ABI compatibility in the future. Add more 'alias' names for commonly used events. - bug fixes & documentation.
Diffstat (limited to 'usr.sbin/pmccontrol')
-rw-r--r--usr.sbin/pmccontrol/pmccontrol.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c
index 6ffa2d1..8e52614 100644
--- a/usr.sbin/pmccontrol/pmccontrol.c
+++ b/usr.sbin/pmccontrol/pmccontrol.c
@@ -222,8 +222,8 @@ pmcc_do_list_state(void)
int c, cpu, n, npmc, ncpu;
unsigned int logical_cpus_mask;
struct pmc_info *pd;
- struct pmc_op_getpmcinfo *pi;
- const struct pmc_op_getcpuinfo *pc;
+ struct pmc_pmcinfo *pi;
+ const struct pmc_cpuinfo *pc;
if (pmc_cpuinfo(&pc) != 0)
err(EX_OSERR, "Unable to determine CPU information");
@@ -280,7 +280,7 @@ pmcc_do_list_events(void)
enum pmc_class c;
unsigned int i, j, nevents;
const char **eventnamelist;
- const struct pmc_op_getcpuinfo *ci;
+ const struct pmc_cpuinfo *ci;
if (pmc_cpuinfo(&ci) != 0)
err(EX_OSERR, "Unable to determine CPU information");
@@ -307,7 +307,7 @@ static int
pmcc_show_statistics(void)
{
- struct pmc_op_getdriverstats gms;
+ struct pmc_driverstats gms;
if (pmc_get_driver_stats(&gms) < 0)
err(EX_OSERR, "ERROR: cannot retrieve driver statistics");
@@ -316,12 +316,15 @@ pmcc_show_statistics(void)
* Print statistics.
*/
-#define PRINT(N,V) (void) printf("%20s %d\n", (N), gms.pm_##V)
-
- PRINT("interrupts-processed", intr_processed);
- PRINT("interrupts-ignored", intr_ignored);
- PRINT("system-calls", syscalls);
- PRINT("system-calls-with-errors", syscall_errors);
+#define PRINT(N,V) (void) printf("%-40s %d\n", (N), gms.pm_##V)
+ PRINT("interrupts processed:", intr_processed);
+ PRINT("non-PMC interrupts:", intr_ignored);
+ PRINT("interrupts dropped due to lack of space:", intr_bufferfull);
+ PRINT("system calls:", syscalls);
+ PRINT("system calls with errors:", syscall_errors);
+ PRINT("buffer requests:", buffer_requests);
+ PRINT("buffer requests failed:", buffer_requests_failed);
+ PRINT("sampling log sweeps:", log_sweeps);
return 0;
}
OpenPOWER on IntegriCloud