summaryrefslogtreecommitdiffstats
path: root/lib/libpmc/pmc_configure_logfile.3
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2011-10-18 15:25:43 +0000
committerfabient <fabient@FreeBSD.org>2011-10-18 15:25:43 +0000
commitc0da433b0a908c85fe0547ba8054795948e39d30 (patch)
tree3965b86bd8e0e5d008fd4219e7d38fa2351bfcac /lib/libpmc/pmc_configure_logfile.3
parent9e1982ba8eaabe131f148406f3f2819d8e0e1563 (diff)
downloadFreeBSD-src-c0da433b0a908c85fe0547ba8054795948e39d30.zip
FreeBSD-src-c0da433b0a908c85fe0547ba8054795948e39d30.tar.gz
Add a flush of the current PMC log buffer before displaying the next top.
As the underlying block is 4KB if the PMC throughput is low the measurement will be reported on the next tick. pmcstat(8) use the modified flush API to reclaim current buffer before displaying next top. MFC after: 1 month
Diffstat (limited to 'lib/libpmc/pmc_configure_logfile.3')
-rw-r--r--lib/libpmc/pmc_configure_logfile.311
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libpmc/pmc_configure_logfile.3 b/lib/libpmc/pmc_configure_logfile.3
index a33688c..399f21a 100644
--- a/lib/libpmc/pmc_configure_logfile.3
+++ b/lib/libpmc/pmc_configure_logfile.3
@@ -29,7 +29,8 @@
.Sh NAME
.Nm pmc_configure_logfile ,
.Nm pmc_flush_logfile ,
-.Nm pmc_writelog
+.Nm pmc_writelog ,
+.Nm pmc_close_logfile
.Nd log file management
.Sh LIBRARY
.Lb libpmc
@@ -41,6 +42,8 @@
.Fn pmc_flush_logfile void
.Ft int
.Fn pmc_writelog "uint32_t userdata"
+.Ft int
+.Fn pmc_close_logfile void
.Sh DESCRIPTION
The functions manage logging of
.Xr hwpmc 4
@@ -72,6 +75,12 @@ Function
will append a log entry containing the value of argument
.Fa userdata
to the log file.
+.Pp
+Function
+.Fn pmc_close_logfile
+will flush all pending log data and close
+.Xr hwpmc 4 Ns Ap s
+side of the stream.
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS
OpenPOWER on IntegriCloud