git: e0ae2b39aa3e - stable/13 - pmc_allocate(3): document the count argument
Mitchell Horne
mhorne at FreeBSD.org
Thu Apr 29 13:39:17 UTC 2021
The branch stable/13 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10
commit e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10
Author: Mitchell Horne <mhorne at FreeBSD.org>
AuthorDate: 2021-04-21 20:27:49 +0000
Commit: Mitchell Horne <mhorne at FreeBSD.org>
CommitDate: 2021-04-29 13:13:57 +0000
pmc_allocate(3): document the count argument
This was added in b2ca2e50b9aa, and serves to provide an initial value
to the PMC, eliminating the need for a second syscall via pmc_set(3).
Reviewed by: gnn, 0mp (manpages)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29885
(cherry picked from commit 50f6c139970084adeefec98c658645c34b72209e)
---
lib/libpmc/pmc_allocate.3 | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/lib/libpmc/pmc_allocate.3 b/lib/libpmc/pmc_allocate.3
index 291ca8ac0113..515b427cf7bc 100644
--- a/lib/libpmc/pmc_allocate.3
+++ b/lib/libpmc/pmc_allocate.3
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 22, 2008
+.Dd April 21, 2021
.Dt PMC_ALLOCATE 3
.Os
.Sh NAME
@@ -41,6 +41,7 @@
.Fa "uint32_t flags"
.Fa "int cpu"
.Fa "pmc_id_t *pmcid"
+.Fa "uint64_t count"
.Fc
.Ft int
.Fn pmc_release "pmc_id_t pmc"
@@ -111,6 +112,20 @@ Process scope PMC allocations should specify the constant
.Dv PMC_CPU_ANY
for this argument.
.Pp
+The
+.Fa count
+argument behaves identically to the
+.Xr pmc_set 3
+function's
+.Fa value
+argument.
+For counting PMCs,
+.Fa count
+specifies the initial value of the allocated PMC.
+For sampling PMCs,
+.Fa count
+specifies the reload count.
+.Pp
Function
.Fn pmc_release
releases the PMC denoted by argument
More information about the dev-commits-src-all
mailing list