svn commit: r205001 - stable/7/usr.sbin/pmcstat
Fabien Thomas
fabient at FreeBSD.org
Thu Mar 11 07:39:37 UTC 2010
Author: fabient
Date: Thu Mar 11 07:39:36 2010
New Revision: 205001
URL: http://svn.freebsd.org/changeset/base/205001
Log:
MFC r204878:
Change the way shutdown is handled for log file.
pmc_flush_logfile is now non-blocking and just ask the kernel
to shutdown the file. From that point, no more data is
accepted by the log thread and when the last buffer is flushed
the file is closed.
This will remove a deadlock between pmcstat asking for
flush while it cannot flush the pipe itself.
Modified:
stable/7/usr.sbin/pmcstat/pmcstat_log.c
Directory Properties:
stable/7/usr.sbin/pmcstat/ (props changed)
Modified: stable/7/usr.sbin/pmcstat/pmcstat_log.c
==============================================================================
--- stable/7/usr.sbin/pmcstat/pmcstat_log.c Thu Mar 11 07:38:27 2010 (r205000)
+++ stable/7/usr.sbin/pmcstat/pmcstat_log.c Thu Mar 11 07:39:36 2010 (r205001)
@@ -1670,10 +1670,8 @@ pmcstat_print_log(void)
int
pmcstat_close_log(void)
{
- if (pmc_flush_logfile() < 0 ||
- pmc_configure_logfile(-1) < 0)
+ if (pmc_flush_logfile() < 0)
err(EX_OSERR, "ERROR: logging failed");
- args.pa_flags &= ~(FLAG_HAS_OUTPUT_LOGFILE | FLAG_HAS_PIPE);
return (args.pa_flags & FLAG_HAS_PIPE ? PMCSTAT_EXITING :
PMCSTAT_FINISHED);
}
More information about the svn-src-all
mailing list