hwpmc.4 (145256) | hwpmc.4 (145774) |
---|---|
1.\" Copyright (c) 2003-2005 Joseph Koshy 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" | 1.\" Copyright (c) 2003-2005 Joseph Koshy 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/share/man/man4/hwpmc.4 145256 2005-04-19 04:01:25Z jkoshy $ | 25.\" $FreeBSD: head/share/man/man4/hwpmc.4 145774 2005-05-01 14:11:49Z jkoshy $ |
26.\" 27.Dd Apr 15, 2005 28.Dt HWPMC 4 29.Os 30.Sh NAME 31.Nm hwpmc 32.Nd Hardware performance monitoring counter support 33.Sh SYNOPSIS --- 248 unchanged lines hidden (view full) --- 282retrievable using the 283.Ic PMC_OP_PMCX86GETMSR 284system call. 285.Bl -tag -width indent 286.It Ic PMC_OP_PMCX86GETMSR 287Retrieve the MSR (machine specific register) number associated with 288the given PMC handle. 289.Pp | 26.\" 27.Dd Apr 15, 2005 28.Dt HWPMC 4 29.Os 30.Sh NAME 31.Nm hwpmc 32.Nd Hardware performance monitoring counter support 33.Sh SYNOPSIS --- 248 unchanged lines hidden (view full) --- 282retrievable using the 283.Ic PMC_OP_PMCX86GETMSR 284system call. 285.Bl -tag -width indent 286.It Ic PMC_OP_PMCX86GETMSR 287Retrieve the MSR (machine specific register) number associated with 288the given PMC handle. 289.Pp |
290This operation is only valid for PMCs allocated in process-private modes. | 290The PMC needs to be in process-private mode and allocated without the 291.Va PMC_F_DESCENDANTS 292modifier flag, and should be attached only to its owner process at the 293time of the call. |
291.El 292.Ss amd64 SPECIFIC API 293AMD64 cpus support the RDPMC instruction which allows a 294user process to read a PMC value without needing to invoke a 295.Ic PMC_OP_PMCRW 296operation. 297The machine address associated with an allocated PMC is 298retrievable using the 299.Ic PMC_OP_PMCX86GETMSR 300system call. 301.Bl -tag -width indent 302.It Ic PMC_OP_PMCX86GETMSR 303Retrieve the MSR (machine specific register) number associated with 304the given PMC handle. 305.Pp | 294.El 295.Ss amd64 SPECIFIC API 296AMD64 cpus support the RDPMC instruction which allows a 297user process to read a PMC value without needing to invoke a 298.Ic PMC_OP_PMCRW 299operation. 300The machine address associated with an allocated PMC is 301retrievable using the 302.Ic PMC_OP_PMCX86GETMSR 303system call. 304.Bl -tag -width indent 305.It Ic PMC_OP_PMCX86GETMSR 306Retrieve the MSR (machine specific register) number associated with 307the given PMC handle. 308.Pp |
306This operation is only valid for PMCs allocated in process-private modes. | 309The PMC needs to be in process-private mode and allocated without the 310.Va PMC_F_DESCENDANTS 311modifier flag, and should be attached only to its owner process at the 312time of the call. |
307.El 308.Sh SYSCTL TUNABLES 309The behavior of 310.Nm 311is influenced by the following 312.Xr sysctl 8 313tunables: 314.Bl -tag -width indent --- 195 unchanged lines hidden (view full) --- 510Argument 511.Ar pm_flags 512to a 513.Ic PMC_OP_PMCRW 514request contained illegal flags. 515.It Bq Er EINVAL 516A 517.Ic PMC_OP_PMCX86GETMSR | 313.El 314.Sh SYSCTL TUNABLES 315The behavior of 316.Nm 317is influenced by the following 318.Xr sysctl 8 319tunables: 320.Bl -tag -width indent --- 195 unchanged lines hidden (view full) --- 516Argument 517.Ar pm_flags 518to a 519.Ic PMC_OP_PMCRW 520request contained illegal flags. 521.It Bq Er EINVAL 522A 523.Ic PMC_OP_PMCX86GETMSR |
518operation was requested for a PMC not in process-virtual mode. | 524operation was requested for a PMC not in process-virtual mode, or 525for a PMC that is not solely attached to its owner process, or for 526a PMC that was allocated with flag 527.Va PMC_F_DESCENDANTS . |
519.It Bq Er EINVAL 520(On Intel Pentium 4 CPUs with HTT support) An allocation request for 521a process-private PMC was issued for an event that does not support 522counting on a per-logical CPU basis. 523.It Bq Er ENOMEM 524The system was not able to allocate kernel memory. 525.It Bq Er ENOSYS 526(i386 architectures) A --- 19 unchanged lines hidden (view full) --- 546.Ic OP_PMCADMIN 547request was issued by a process without super-user 548privilege or by a jailed super-user process. 549.It Bq Er EPERM 550An 551.Ic PMC_OP_PMCATTACH 552operation was issued for a target process that the current process 553does not have permission to attach to. | 528.It Bq Er EINVAL 529(On Intel Pentium 4 CPUs with HTT support) An allocation request for 530a process-private PMC was issued for an event that does not support 531counting on a per-logical CPU basis. 532.It Bq Er ENOMEM 533The system was not able to allocate kernel memory. 534.It Bq Er ENOSYS 535(i386 architectures) A --- 19 unchanged lines hidden (view full) --- 555.Ic OP_PMCADMIN 556request was issued by a process without super-user 557privilege or by a jailed super-user process. 558.It Bq Er EPERM 559An 560.Ic PMC_OP_PMCATTACH 561operation was issued for a target process that the current process 562does not have permission to attach to. |
563.It Bq Er EPERM 564.Pq "i386 and amd64 architectures" 565An 566.Ic PMC_OP_PMCATTACH 567operation was issued on a PMC whose MSR has been retrieved using 568.Ic PMC_OP_PMCX86GETMSR . |
|
554.It Bq Er ESRCH 555A process issued a PMC operation request without having allocated any PMCs. 556.It Bq Er ESRCH 557A 558.Ic PMC_OP_PMCATTACH 559request specified a non-existent process id. 560.It Bq Er ESRCH 561The target process for a --- 22 unchanged lines hidden --- | 569.It Bq Er ESRCH 570A process issued a PMC operation request without having allocated any PMCs. 571.It Bq Er ESRCH 572A 573.Ic PMC_OP_PMCATTACH 574request specified a non-existent process id. 575.It Bq Er ESRCH 576The target process for a --- 22 unchanged lines hidden --- |