Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107807917
D4123.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D4123.diff
View Options
Index: lib/libpmc/pmc.h
===================================================================
--- lib/libpmc/pmc.h
+++ lib/libpmc/pmc.h
@@ -37,14 +37,15 @@
* Driver statistics.
*/
struct pmc_driverstats {
- int pm_intr_ignored; /* #interrupts ignored */
- int pm_intr_processed; /* #interrupts processed */
- int pm_intr_bufferfull; /* #interrupts with ENOSPC */
- int pm_syscalls; /* #syscalls */
- int pm_syscall_errors; /* #syscalls with errors */
- int pm_buffer_requests; /* #buffer requests */
- int pm_buffer_requests_failed; /* #failed buffer requests */
- int pm_log_sweeps; /* #sample buffer processing passes */
+ unsigned int pm_intr_ignored; /* #interrupts ignored */
+ unsigned int pm_intr_processed; /* #interrupts processed */
+ unsigned int pm_intr_bufferfull; /* #interrupts with ENOSPC */
+ unsigned int pm_syscalls; /* #syscalls */
+ unsigned int pm_syscall_errors; /* #syscalls with errors */
+ unsigned int pm_buffer_requests; /* #buffer requests */
+ unsigned int pm_buffer_requests_failed; /* #failed buffer requests */
+ unsigned int pm_log_sweeps; /* #sample buffer processing
+ passes */
};
/*
Index: sys/sys/pmc.h
===================================================================
--- sys/sys/pmc.h
+++ sys/sys/pmc.h
@@ -550,14 +550,15 @@
*/
struct pmc_op_getdriverstats {
- int pm_intr_ignored; /* #interrupts ignored */
- int pm_intr_processed; /* #interrupts processed */
- int pm_intr_bufferfull; /* #interrupts with ENOSPC */
- int pm_syscalls; /* #syscalls */
- int pm_syscall_errors; /* #syscalls with errors */
- int pm_buffer_requests; /* #buffer requests */
- int pm_buffer_requests_failed; /* #failed buffer requests */
- int pm_log_sweeps; /* #sample buffer processing passes */
+ unsigned int pm_intr_ignored; /* #interrupts ignored */
+ unsigned int pm_intr_processed; /* #interrupts processed */
+ unsigned int pm_intr_bufferfull; /* #interrupts with ENOSPC */
+ unsigned int pm_syscalls; /* #syscalls */
+ unsigned int pm_syscall_errors; /* #syscalls with errors */
+ unsigned int pm_buffer_requests; /* #buffer requests */
+ unsigned int pm_buffer_requests_failed; /* #failed buffer requests */
+ unsigned int pm_log_sweeps; /* #sample buffer processing
+ passes */
};
/*
Index: usr.sbin/pmcstat/pmcstat.c
===================================================================
--- usr.sbin/pmcstat/pmcstat.c
+++ usr.sbin/pmcstat/pmcstat.c
@@ -1500,14 +1500,24 @@
"ERROR: Cannot retrieve driver statistics");
if (ds_start.pm_intr_bufferfull != ds_end.pm_intr_bufferfull &&
args.pa_verbosity > 0)
- warnx("WARNING: some samples were dropped.\n"
-"Please consider tuning the \"kern.hwpmc.nsamples\" tunable."
+ warnx(
+"WARNING: sampling was paused at least %u time%s.\n"
+"Please consider tuning the \"kern.hwpmc.nsamples\" tunable.",
+ ds_end.pm_intr_bufferfull -
+ ds_start.pm_intr_bufferfull,
+ ((ds_end.pm_intr_bufferfull -
+ ds_start.pm_intr_bufferfull) != 1) ? "s" : ""
);
if (ds_start.pm_buffer_requests_failed !=
ds_end.pm_buffer_requests_failed &&
args.pa_verbosity > 0)
- warnx("WARNING: some events were discarded.\n"
-"Please consider tuning the \"kern.hwpmc.nbuffers\" tunable."
+ warnx(
+"WARNING: at least %u event%s were discarded while running.\n"
+"Please consider tuning the \"kern.hwpmc.nbuffers\" tunable.",
+ ds_end.pm_buffer_requests_failed -
+ ds_start.pm_buffer_requests_failed,
+ ((ds_end.pm_buffer_requests_failed -
+ ds_start.pm_buffer_requests_failed) != 1) ? "s" : ""
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 8:17 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15936786
Default Alt Text
D4123.diff (3 KB)
Attached To
Mode
D4123: Make pmcstat provide a better warning message to users when samples are dropped
Attached
Detach File
Event Timeline
Log In to Comment