svn commit: r328088 - head/usr.sbin/pmcstat
Fabien Thomas
fabient at FreeBSD.org
Wed Jan 17 16:55:37 UTC 2018
Author: fabient
Date: Wed Jan 17 16:55:35 2018
New Revision: 328088
URL: https://svnweb.freebsd.org/changeset/base/328088
Log:
Only call flush in pipe mode.
It fixes a crash with a socket in top mode.
Ex:
# pmcstat -R 127.0.0.1:8080 -T -w1
then
# pmcstat -n1 -Sclock.prof -Slock.failed -O 127.0.0.1:8080
MFC after: 1 week
Sponsored by: Stormshield
Modified:
head/usr.sbin/pmcstat/pmcstat.c
Modified: head/usr.sbin/pmcstat/pmcstat.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcstat.c Wed Jan 17 16:41:22 2018 (r328087)
+++ head/usr.sbin/pmcstat/pmcstat.c Wed Jan 17 16:55:35 2018 (r328088)
@@ -1350,6 +1350,7 @@ main(int argc, char **argv)
}
/* print out counting PMCs */
if ((args.pa_flags & FLAG_DO_TOP) &&
+ (args.pa_flags & FLAG_HAS_PIPE) &&
pmc_flush_logfile() == 0)
do_read = 1;
do_print = 1;
More information about the svn-src-all
mailing list