summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2005-12-24 17:00:33 +0000
committerjkoshy <jkoshy@FreeBSD.org>2005-12-24 17:00:33 +0000
commitd308f9605c53885bdcb4603a1d305f4e9ad04956 (patch)
tree1244198e162df6e693e785e33587dcd767c98991 /usr.sbin/pmcstat
parent7ed4cc5d2103c40bf23f0400f4b5a47c42d6e2a6 (diff)
downloadFreeBSD-src-d308f9605c53885bdcb4603a1d305f4e9ad04956.zip
FreeBSD-src-d308f9605c53885bdcb4603a1d305f4e9ad04956.tar.gz
- Don't print an errno string when reporting dropped samples.
- Prevent an unsuccessful exec() of a target program from triggering a false 'dropped samples' message.
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r--usr.sbin/pmcstat/pmcstat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index e591f9a..9db889b 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -376,7 +376,8 @@ main(int argc, char **argv)
args.pa_printfile = stderr;
args.pa_interval = DEFAULT_WAIT_INTERVAL;
STAILQ_INIT(&args.pa_head);
-
+ bzero(&ds_start, sizeof(ds_start));
+ bzero(&ds_end, sizeof(ds_end));
ev = NULL;
while ((option = getopt(argc, argv, "CD:EO:P:R:S:Wc:dgk:n:o:p:s:t:w:"))
@@ -971,12 +972,12 @@ main(int argc, char **argv)
err(EX_OSERR, "ERROR: Cannot retrieve driver "
"statistics");
if (ds_start.pm_intr_bufferfull != ds_end.pm_intr_bufferfull)
- warn("WARNING: some samples were dropped. Please "
+ warnx("WARNING: some samples were dropped. Please "
"consider tuning the \"kern.hwpmc.nsamples\" "
"tunable.");
if (ds_start.pm_buffer_requests_failed !=
ds_end.pm_buffer_requests_failed)
- warn("WARNING: some events were discarded. Please "
+ warnx("WARNING: some events were discarded. Please "
"consider tuning the \"kern.hwpmc.nbuffers\" "
"tunable.");
}
OpenPOWER on IntegriCloud