diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2005-05-01 14:11:49 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2005-05-01 14:11:49 +0000 |
commit | a21392e3accd60fd407365553a29a3b7250316cc (patch) | |
tree | 1e7573a97fa735d4770310305b9ec83d8767f4a7 /share/man/man4/hwpmc.4 | |
parent | 88ecd82ce992dc5add7c7c4e8a56fd3c6fed65a3 (diff) | |
download | FreeBSD-src-a21392e3accd60fd407365553a29a3b7250316cc.zip FreeBSD-src-a21392e3accd60fd407365553a29a3b7250316cc.tar.gz |
Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.
Have pmcstat(8) and pmccontrol(8) use these APIs.
Return PMC class-related constants (PMC widths and capabilities)
with the OP GETCPUINFO call leaving OP PMCINFO to return only the
dynamic information associated with a PMC (i.e., whether enabled,
owner pid, reload count etc.).
Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to
get upto-date values from hardware since we can guarantee that the
hardware is running the correct PMC at the time of the call.
Bug fixes:
- (x86 class processors) Fix a bug that prevented an RDPMC
instruction from being recognized as permitted till after the
attached process had context switched out and back in again after
a pmc_start() call.
Tighten the rules for using RDPMC class instructions: a GETMSR
OP is now allowed only after an OP ATTACH has been done by the
PMC's owner to itself. OP GETMSR is not allowed for PMCs that
track descendants, for PMCs attached to processes other than
their owner processes.
- (P4/HTT processors only) Fix a bug that caused the MI and MD
layers to get out of sync. Add a new MD operation 'get_config()'
as part of this fix.
- Allow multiple system-mode PMCs at the same row-index but on
different CPUs to be allocated.
- Reject allocation of an administratively disabled PMC.
Misc. code cleanups and refactoring. Improve a few comments.
Diffstat (limited to 'share/man/man4/hwpmc.4')
-rw-r--r-- | share/man/man4/hwpmc.4 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4 index 4a6c8cf..d2f7309 100644 --- a/share/man/man4/hwpmc.4 +++ b/share/man/man4/hwpmc.4 @@ -287,7 +287,10 @@ system call. Retrieve the MSR (machine specific register) number associated with the given PMC handle. .Pp -This operation is only valid for PMCs allocated in process-private modes. +The PMC needs to be in process-private mode and allocated without the +.Va PMC_F_DESCENDANTS +modifier flag, and should be attached only to its owner process at the +time of the call. .El .Ss amd64 SPECIFIC API AMD64 cpus support the RDPMC instruction which allows a @@ -303,7 +306,10 @@ system call. Retrieve the MSR (machine specific register) number associated with the given PMC handle. .Pp -This operation is only valid for PMCs allocated in process-private modes. +The PMC needs to be in process-private mode and allocated without the +.Va PMC_F_DESCENDANTS +modifier flag, and should be attached only to its owner process at the +time of the call. .El .Sh SYSCTL TUNABLES The behavior of @@ -515,7 +521,10 @@ request contained illegal flags. .It Bq Er EINVAL A .Ic PMC_OP_PMCX86GETMSR -operation was requested for a PMC not in process-virtual mode. +operation was requested for a PMC not in process-virtual mode, or +for a PMC that is not solely attached to its owner process, or for +a PMC that was allocated with flag +.Va PMC_F_DESCENDANTS . .It Bq Er EINVAL (On Intel Pentium 4 CPUs with HTT support) An allocation request for a process-private PMC was issued for an event that does not support @@ -551,6 +560,12 @@ An .Ic PMC_OP_PMCATTACH operation was issued for a target process that the current process does not have permission to attach to. +.It Bq Er EPERM +.Pq "i386 and amd64 architectures" +An +.Ic PMC_OP_PMCATTACH +operation was issued on a PMC whose MSR has been retrieved using +.Ic PMC_OP_PMCX86GETMSR . .It Bq Er ESRCH A process issued a PMC operation request without having allocated any PMCs. .It Bq Er ESRCH |