From owner-dev-commits-src-all@freebsd.org Thu Apr 29 13:39:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77EFD6287F2; Thu, 29 Apr 2021 13:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FWGnK2vTgz4g1R; Thu, 29 Apr 2021 13:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 567CB1CC56; Thu, 29 Apr 2021 13:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13TDdH2m070777; Thu, 29 Apr 2021 13:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13TDdHIb070776; Thu, 29 Apr 2021 13:39:17 GMT (envelope-from git) Date: Thu, 29 Apr 2021 13:39:17 GMT Message-Id: <202104291339.13TDdHIb070776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e0ae2b39aa3e - stable/13 - pmc_allocate(3): document the count argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 13:39:17 -0000 The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10 commit e0ae2b39aa3e51b0e3f7b9661192cba8f06e7b10 Author: Mitchell Horne AuthorDate: 2021-04-21 20:27:49 +0000 Commit: Mitchell Horne 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