Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2005 04:00:03 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 79229 for review
Message-ID:  <200506300400.j5U403D8071464@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=79229

Change 79229 by peter@peter_overcee on 2005/06/30 03:59:44

	IFC @79225

Affected files ...

.. //depot/projects/hammer/lib/libkvm/kvm_i386.c#11 integrate
.. //depot/projects/hammer/share/man/man4/hwpmc.4#5 integrate
.. //depot/projects/hammer/sys/kern/subr_smp.c#26 integrate

Differences ...

==== //depot/projects/hammer/lib/libkvm/kvm_i386.c#11 (text+ko) ====

@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libkvm/kvm_i386.c,v 1.16 2005/06/29 22:39:41 peter Exp $");
+__FBSDID("$FreeBSD: src/lib/libkvm/kvm_i386.c,v 1.17 2005/06/30 01:25:21 ps Exp $");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 #if 0
@@ -423,7 +423,7 @@
 }
 
 int
-_kvm_kvatop(kvm_t *kd, u_long va, uint64_t *pa)
+_kvm_kvatop(kvm_t *kd, u_long va, off_t *pa)
 {
 
 	if (ISALIVE(kd)) {

==== //depot/projects/hammer/share/man/man4/hwpmc.4#5 (text+ko) ====

@@ -22,18 +22,17 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/hwpmc.4,v 1.5 2005/06/19 18:36:00 rwatson Exp $
+.\" $FreeBSD: src/share/man/man4/hwpmc.4,v 1.6 2005/06/30 02:38:46 jkoshy Exp $
 .\"
-.Dd Apr 15, 2005
+.Dd April 15, 2005
 .Dt HWPMC 4
 .Os
 .Sh NAME
 .Nm hwpmc
-.Nd Hardware performance monitoring counter support
+.Nd "Hardware Performance Monitoring Counter support"
 .Sh SYNOPSIS
-.Cd options HWPMC_HOOKS
-.br
-.Cd device hwpmc
+.Cd "options HWPMC_HOOKS"
+.Cd "device hwpmc"
 .Sh DESCRIPTION
 The
 .Nm
@@ -44,10 +43,10 @@
 The driver supports multi-processor systems.
 .Pp
 PMCs are allocated using the
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request.
 A successful
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request will return an integer handle (typically a small integer) to
 the requesting process.
 Subsequent operations on the allocated PMC use this handle to denote
@@ -57,12 +56,12 @@
 .Pp
 PMCs may be allocated to operate in process-private or in system-wide
 modes.
-.Bl -hang -width "XXXXXXXXXXXXXXX"
+.Bl -tag -width ".Em Process-private"
 .It Em Process-private
 In process-private mode, a PMC is active only when a thread belonging
 to a process it is attached to is scheduled on a CPU.
 .It Em System-wide
-In system-wide mode a PMC operates independently of processes and
+In system-wide mode, a PMC operates independently of processes and
 measures hardware events for the system as a whole.
 .El
 .Pp
@@ -70,11 +69,10 @@
 .Nm
 driver supports the use of hardware PMCs for counting or for
 sampling:
-.Bl -hang -width "XXXXXXXXX"
-.It Em Counting
+.Bl -tag -width ".Em Counting"
 In counting modes, the PMCs count hardware events.
 These counts are retrievable using the
-.Ic PMC_OP_PMCREAD
+.Dv PMC_OP_PMCREAD
 system call on all architectures, though some architectures like the
 x86 and amd64 offer faster methods of reading these counts.
 .It Em Sampling
@@ -93,10 +91,10 @@
 scheduled on a CPU.
 These PMCs normally count from zero, but the initial count may be
 set using the
-.Ic PMC_OP_SETCOUNT
+.Dv PMC_OP_SETCOUNT
 operation.
 Applications can read the value of the PMC anytime using the
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 operation.
 .It Process-private, sampling
 These PMCs sample the target processes instruction pointer after they
@@ -104,30 +102,30 @@
 The PMCs only count events when a thread belonging to their attached
 process is active.
 The desired frequency of sampling is set using the
-.Ic PMC_OP_SETCOUNT
+.Dv PMC_OP_SETCOUNT
 operation prior to starting the PMC.
 Log files are configured using the
-.Ic PMC_OP_CONFIGURELOG
+.Dv PMC_OP_CONFIGURELOG
 operation.
 .It System-wide, counting
 These PMCs count hardware events seen by them independent of the
 processes that are executing.
 The current count on these PMCs can be read using the
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 request.
 These PMCs normally count from zero, but the initial count may be
 set using the
-.Ic PMC_OP_SETCOUNT
+.Dv PMC_OP_SETCOUNT
 operation.
 .It System-wide, sampling
 These PMCs will periodically sample the instruction pointer of the CPU
 they are allocated on, and will write the sample to a log for further
 processing.
 The desired frequency of sampling is set using the
-.Ic PMC_OP_SETCOUNT
+.Dv PMC_OP_SETCOUNT
 operation prior to starting the PMC.
 Log files are configured using the
-.Ic PMC_OP_CONFIGURELOG
+.Dv PMC_OP_CONFIGURELOG
 operation.
 .Pp
 System-wide statistical sampling can only be enabled by a process with
@@ -144,9 +142,9 @@
 driver.
 .Pp
 Allocated PMCs are started using the
-.Ic PMC_OP_PMCSTART
+.Dv PMC_OP_PMCSTART
 operation, and stopped using the
-.Ic PMC_OP_PMCSTOP
+.Dv PMC_OP_PMCSTOP
 operation.
 Stopping and starting a PMC is permitted at any time the owner process
 has a valid handle to the PMC.
@@ -154,14 +152,14 @@
 Process-private PMCs need to be attached to a target process before
 they can be used.
 Attaching a process to a PMC is done using the
-.Ic PMC_OP_PMCATTACH
+.Dv PMC_OP_PMCATTACH
 operation.
 An already attached PMC may be detached from its target process
 using the converse
-.Ic PMC_OP_PMCDETACH
+.Dv PMC_OP_PMCDETACH
 operation.
-Issuing an
-.Ic PMC_OP_PMCSTART
+Issuing a
+.Dv PMC_OP_PMCSTART
 operation on an as yet unattached PMC will cause it to be attached
 to its owner process.
 The following rules determine whether a given process may attach
@@ -177,16 +175,16 @@
 .El
 .Pp
 PMCs are released using
-.Ic PMC_OP_PMCRELEASE .
+.Dv PMC_OP_PMCRELEASE .
 After a successful
-.Ic PMC_OP_PMCRELEASE
+.Dv PMC_OP_PMCRELEASE
 operation the handle to the PMC will become invalid.
-.Ss MODIFIER FLAGS
+.Ss Modifier Flags
 The
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 operation supports the following flags that modify the behavior
 of an allocated PMC:
-.Bl -tag -width indent -compact
+.Bl -tag -width indent
 .It Dv PMC_F_DESCENDANTS
 This modifier is valid only for a PMC being allocated in process-private
 mode.
@@ -212,10 +210,11 @@
 .Nm
 will maintain per-process counts for each target process attached to
 a PMC.
-At process exit time, a record containing the target process' pid and
+At process exit time, a record containing the target process' PID and
 the accumulated per-process count for that process will be written to the
 configured log file.
 .El
+.Pp
 Modifiers
 .Dv PMC_F_LOG_PROCEXIT
 and
@@ -228,17 +227,17 @@
 and
 .Dv PMC_F_LOG_PROCCSW
 cannot be started until their owner process has configured a log file.
-.Ss SIGNALS
+.Ss Signals
 The
 .Nm
 driver may deliver signals to processes that have allocated PMCs:
-.Bl -tag -width "XXXXXXXX" -compact
-.It Bq SIGIO
+.Bl -tag -width ".Dv SIGBUS"
+.It Dv SIGIO
 A
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 operation was attempted on a process-private PMC that does not have
 attached target processes.
-.It Bq SIGBUS
+.It Dv SIGBUS
 The
 .Nm
 driver is being unloaded from the kernel.
@@ -247,8 +246,9 @@
 The recommended way for application programs to use the facilities of
 the
 .Nm
-driver is using the API provided by the library
-.Xr pmc 3 .
+driver is using the API provided by the
+.Xr pmc 3
+library.
 .Pp
 The
 .Nm
@@ -259,36 +259,36 @@
 .Nm
 driver supports the following operations:
 .Bl -tag -width indent
-.It Ic PMC_OP_CONFIGURELOG
+.It Dv PMC_OP_CONFIGURELOG
 Configure a log file for sampling mode PMCs.
-.It Ic PMC_OP_FLUSHLOG
+.It Dv PMC_OP_FLUSHLOG
 Transfer buffered log data inside
 .Nm
 to a configured output file.
 This operation returns to the caller after the write operation
 has returned.
-.It Ic PMC_OP_GETCPUINFO
+.It Dv PMC_OP_GETCPUINFO
 Retrieve information about the number of CPUs on the system and
 the number of hardware performance monitoring counters available per-CPU.
-.It Ic PMC_OP_GETDRIVERSTATS
+.It Dv PMC_OP_GETDRIVERSTATS
 Retrieve module statistics (for analyzing the behavior of
 .Nm
 itself).
-.It Ic PMC_OP_GETMODULEVERSION
+.It Dv PMC_OP_GETMODULEVERSION
 Retrieve the version number of API.
-.It Ic PMC_OP_GETPMCINFO
+.It Dv PMC_OP_GETPMCINFO
 Retrieve information about the current state of the PMCs on a
 given CPU.
-.It Ic PMC_OP_PMCADMIN
+.It Dv PMC_OP_PMCADMIN
 Set the administrative state (i.e., whether enabled or disabled) for
 the hardware PMCs managed by the
 .Nm
 driver.
-.It Ic PMC_OP_PMCALLOCATE
+.It Dv PMC_OP_PMCALLOCATE
 Allocate and configure a PMC.
 On successful allocation, a handle to the PMC (a small integer)
 is returned.
-.It Ic PMC_OP_PMCATTACH
+.It Dv PMC_OP_PMCATTACH
 Attach a process mode PMC to a target process.
 The PMC will be active whenever a thread in the target process is
 scheduled on a CPU.
@@ -297,58 +297,58 @@
 .Dv PMC_F_DESCENDANTS
 flag had been specified at PMC allocation time, then the PMC is
 attached to all current and future descendants of the target process.
-.It Ic PMC_OP_PMCDETACH
+.It Dv PMC_OP_PMCDETACH
 Detach a PMC from its target process.
-.It Ic PMC_OP_PMCRELEASE
+.It Dv PMC_OP_PMCRELEASE
 Release a PMC.
-.It Ic PMC_OP_PMCRW
+.It Dv PMC_OP_PMCRW
 Read and write a PMC.
 This operation is valid only for PMCs configured in counting modes.
-.It Ic PMC_OP_SETCOUNT
+.It Dv PMC_OP_SETCOUNT
 Set the initial count (for counting mode PMCs) or the desired sampling
 rate (for sampling mode PMCs).
-.It Ic PMC_OP_PMCSTART
+.It Dv PMC_OP_PMCSTART
 Start a PMC.
-.It Ic PMC_OP_PMCSTOP
+.It Dv PMC_OP_PMCSTOP
 Stop a PMC.
-.It Ic PMC_OP_WRITELOG
+.It Dv PMC_OP_WRITELOG
 Insert a timestamped user record into the log file.
 .El
-.Ss i386 SPECIFIC API
+.Ss i386 Specific API
 Some i386 family CPUs support the RDPMC instruction which allows a
 user process to read a PMC value without needing to invoke a
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 operation.
 On such CPUs, the machine address associated with an allocated PMC is
 retrievable using the
-.Ic PMC_OP_PMCX86GETMSR
+.Dv PMC_OP_PMCX86GETMSR
 system call.
 .Bl -tag -width indent
-.It Ic PMC_OP_PMCX86GETMSR
+.It Dv PMC_OP_PMCX86GETMSR
 Retrieve the MSR (machine specific register) number associated with
 the given PMC handle.
 .Pp
 The PMC needs to be in process-private mode and allocated without the
-.Va PMC_F_DESCENDANTS
+.Dv 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
+.Ss amd64 Specific API
+AMD64 CPUs support the RDPMC instruction which allows a
 user process to read a PMC value without needing to invoke a
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 operation.
 The machine address associated with an allocated PMC is
 retrievable using the
-.Ic PMC_OP_PMCX86GETMSR
+.Dv PMC_OP_PMCX86GETMSR
 system call.
 .Bl -tag -width indent
-.It Ic PMC_OP_PMCX86GETMSR
+.It Dv PMC_OP_PMCX86GETMSR
 Retrieve the MSR (machine specific register) number associated with
 the given PMC handle.
 .Pp
 The PMC needs to be in process-private mode and allocated without the
-.Va PMC_F_DESCENDANTS
+.Dv PMC_F_DESCENDANTS
 modifier flag, and should be attached only to its owner process at the
 time of the call.
 .El
@@ -365,17 +365,17 @@
 (Only available if the
 .Nm
 driver was compiled with
-.Fl DDEBUG ) .
+.Fl DDEBUG . )
 Control the verbosity of debug messages from the
 .Nm
 driver.
 .It Va kern.hwpmc.hashsize Pq integer, read-only
-The number of rows in the hash-tables used to keep track of owner and
+The number of rows in the hash tables used to keep track of owner and
 target processes.
 The default is 16.
 .It Va kern.hwpmc.logbuffersize Pq integer, read-only
 The size in kilobytes of each log buffer used by
-.Nm Ap s
+.Nm Ns 's
 logging function.
 The default buffers size is 4KB.
 .It Va kern.hwpmc.mtxpoolsize Pq integer, read-only
@@ -387,7 +387,7 @@
 for logging.
 The default is 16.
 .It Va kern.hwpmc.nsamples Pq integer, read-only
-The number of entries in the per-cpu ring buffer used during sampling.
+The number of entries in the per-CPU ring buffer used during sampling.
 The default is 16.
 .It Va security.bsd.unprivileged_syspmcs Pq boolean, read-write
 If set to non-zero, allow unprivileged processes to allocate system-wide
@@ -414,7 +414,7 @@
 Set the
 .Xr sysctl 8
 tunable
-.Va "security.bsd.unprivileged_syspmcs"
+.Va security.bsd.unprivileged_syspmcs
 to 0.
 This ensures that unprivileged processes cannot allocate system-wide
 PMCs and thus cannot observe the hardware behavior of the system
@@ -430,7 +430,7 @@
 Set the
 .Xr sysctl 8
 tunable
-.Va "security.bsd.unprivileged_proc_debug"
+.Va security.bsd.unprivileged_proc_debug
 to 0.
 This will ensure that an unprivileged process cannot attach a PMC
 to any process other than itself and thus cannot observe the hardware
@@ -452,7 +452,7 @@
 read the TSC using the RDTSC instruction.
 The
 .Nm
-driver preserves this semantic.
+driver preserves this semantics.
 .Ss Intel P4/HTT Handling
 On CPUs with HTT support, Intel P4 PMCs are capable of qualifying
 only a subset of hardware events on a per-logical CPU basis.
@@ -478,60 +478,58 @@
 .Nm
 driver implements a workaround in software and makes the corrected 64
 bit count available via the
-.Ic PMC_OP_RW
+.Dv PMC_OP_RW
 operation.
 Processes that intend to use RDPMC instructions directly or
 that intend to write values larger than 2^31 into these PMCs with
-.Ic PMC_OP_RW
+.Dv PMC_OP_RW
 need to be aware of this hardware limitation.
 .Sh DIAGNOSTICS
 .Bl -diag
-.It hwpmc: tunable hashsize=%d must be greater than zero.
+.It "hwpmc: tunable hashsize=%d must be greater than zero."
 A negative value was supplied for tunable
 .Va kern.hwpmc.hashsize .
-.It hwpmc: tunable logbuffersize=%d must be greater than zero.
+.It "hwpmc: tunable logbuffersize=%d must be greater than zero."
 A negative value was supplied for tunable
 .Va kern.hwpmc.logbuffersize .
-.It hwpmc: tunable nlogbuffers=%d must be greater than zero.
+.It "hwpmc: tunable nlogbuffers=%d must be greater than zero."
 A negative value was supplied for tunable
 .Va kern.hwpmc.nlogbuffers .
-.It hwpmc: tunable nsamples=%d out of range.
+.It "hwpmc: tunable nsamples=%d out of range."
 The value for tunable
 .Va kern.hwpmc.nsamples
 was negative or greater than 65535.
 .El
 .Sh ERRORS
-An command issued to the
+A command issued to the
 .Nm
 driver may fail with the following errors:
 .Bl -tag -width Er
 .It Bq Er EBUSY
-An
-.Ic OP_CONFIGURELOG
+A
+.Dv PMC_OP_CONFIGURELOG
 operation was requested while an existing log was active.
 .It Bq Er EBUSY
-A
-.Ic DISABLE
-operation was requested using the
-.Ic PMC_OP_PMCADMIN
+A DISABLE operation was requested using the
+.Dv PMC_OP_PMCADMIN
 request for a set of hardware resources currently in use for
 process-private PMCs.
 .It Bq Er EBUSY
 A
-.Ic PMC_OP_PMCADMIN
+.Dv PMC_OP_PMCADMIN
 operation was requested on an active system mode PMC.
 .It Bq Er EBUSY
 A
-.Ic PMC_OP_PMCATTACH
+.Dv PMC_OP_PMCATTACH
 operation was requested for a target process that already had another
 PMC using the same hardware resources attached to it.
 .It Bq Er EBUSY
-An
-.Ic PMC_OP_PMCRW
+A
+.Dv PMC_OP_PMCRW
 request writing a new value was issued on a PMC that was active.
 .It Bq Er EDOOFUS
 A
-.Ic PMC_OP_PMCSTART
+.Dv PMC_OP_PMCSTART
 operation was requested without a log file being configured for a
 PMC allocated with
 .Dv PMC_F_LOG_PROCCSW
@@ -539,12 +537,12 @@
 .Dv PMC_F_LOG_PROCEXIT
 modifiers.
 .It Bq Er EBUSY
-An
-.Ic PMC_OP_PMCSETCOUNT
+A
+.Dv PMC_OP_PMCSETCOUNT
 request was issued on a PMC that was active.
 .It Bq Er EEXIST
 A
-.Ic PMC_OP_PMCATTACH
+.Dv PMC_OP_PMCATTACH
 request was reissued for a target process that already is the target
 of this PMC.
 .It Bq Er EFAULT
@@ -552,119 +550,121 @@
 .It Bq Er EINVAL
 A process specified an invalid PMC handle.
 .It Bq Er EINVAL
-An invalid CPU number was passed in for an
-.Ic PMC_OP_GETPMCINFO
+An invalid CPU number was passed in for a
+.Dv PMC_OP_GETPMCINFO
 operation.
 .It Bq Er EINVAL
-An invalid CPU number was passed in for an
-.Ic PMC_OP_PMCADMIN
+An invalid CPU number was passed in for a
+.Dv PMC_OP_PMCADMIN
 operation.
 .It Bq Er EINVAL
-An invalid operation request was passed in for an
-.Ic PMC_OP_PMCADMIN
+An invalid operation request was passed in for a
+.Dv PMC_OP_PMCADMIN
 operation.
 .It Bq Er EINVAL
-An invalid PMC id was passed in for an
-.Ic PMC_OP_PMCADMIN
+An invalid PMC ID was passed in for a
+.Dv PMC_OP_PMCADMIN
 operation.
 .It Bq Er EINVAL
 A suitable PMC matching the parameters passed in to a
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request could not be allocated.
 .It Bq Er EINVAL
 An invalid PMC mode was requested during a
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request.
 .It Bq Er EINVAL
 An invalid CPU number was specified during a
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request.
 .It Bq Er EINVAL
-A cpu other than
-.Li PMC_CPU_ANY
+A CPU other than
+.Dv PMC_CPU_ANY
 was specified in a
-.Ic PMC_OP_ALLOCATE
+.Dv PMC_OP_ALLOCATE
 request for a process-private PMC.
 .It Bq Er EINVAL
-A cpu number of
-.Li PMC_CPU_ANY
+A CPU number of
+.Dv PMC_CPU_ANY
 was specified in a
-.Ic PMC_OP_ALLOCATE
+.Dv PMC_OP_ALLOCATE
 request for a system-wide PMC.
 .It Bq Er EINVAL
 The
 .Ar pm_flags
 argument to an
-.Ic PMC_OP_PMCALLOCATE
+.Dv PMC_OP_PMCALLOCATE
 request contained unknown flags.
 .It Bq Er EINVAL
 A PMC allocated for system-wide operation was specified with a
-.Ic PMC_OP_PMCATTACH
+.Dv PMC_OP_PMCATTACH
 request.
 .It Bq Er EINVAL
 The
 .Ar pm_pid
 argument to a
-.Ic PMC_OP_PMCATTACH
-request specified an illegal process id.
+.Dv PMC_OP_PMCATTACH
+request specified an illegal process ID.
 .It Bq Er EINVAL
 A
-.Ic PMC_OP_PMCDETACH
+.Dv PMC_OP_PMCDETACH
 request was issued for a PMC not attached to the target process.
 .It Bq Er EINVAL
 Argument
 .Ar pm_flags
 to a
-.Ic PMC_OP_PMCRW
+.Dv PMC_OP_PMCRW
 request contained illegal flags.
 .It Bq Er EINVAL
 A
-.Ic PMC_OP_PMCX86GETMSR
+.Dv PMC_OP_PMCX86GETMSR
 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 .
+.Dv PMC_F_DESCENDANTS .
 .It Bq Er EINVAL
-(On Intel Pentium 4 CPUs with HTT support) An allocation request for
+(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
 counting on a per-logical CPU basis.
 .It Bq Er ENOMEM
 The system was not able to allocate kernel memory.
 .It Bq Er ENOSYS
-(i386 architectures) A
-.Ic PMC_OP_PMCX86GETMSR
+(i386 architectures)
+A
+.Dv PMC_OP_PMCX86GETMSR
 operation was requested for hardware that does not support reading
 PMCs directly with the RDPMC instruction.
 .It Bq Er ENXIO
-An
-.Ic OP_GETPMCINFO
+A
+.Dv PMC_OP_GETPMCINFO
 operation was requested for a disabled CPU.
 .It Bq Er ENXIO
 A system-wide PMC on a disabled CPU was requested to be allocated with
-.Ic PMC_OP_PMCALLOCATE .
+.Dv PMC_OP_PMCALLOCATE .
 .It Bq Er ENXIO
 A
-.Ic PMC_OP_PMCSTART
+.Dv PMC_OP_PMCSTART
 or
-.Ic PMC_OP_PMCSTOP
+.Dv PMC_OP_PMCSTOP
 request was issued for a system-wide PMC that was allocated on a
 currently disabled CPU.
 .It Bq Er EPERM
-An
-.Ic OP_PMCADMIN
+A
+.Dv PMC_OP_PMCADMIN
 request was issued by a process without super-user
 privilege or by a jailed super-user process.
 .It Bq Er EPERM
-An
-.Ic PMC_OP_PMCATTACH
+A
+.Dv 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
+(i386 and amd64 architectures)
+A
+.Dv PMC_OP_PMCATTACH
 operation was issued on a PMC whose MSR has been retrieved using
-.Ic PMC_OP_PMCX86GETMSR .
+.Dv PMC_OP_PMCX86GETMSR .
 .It Bq Er ESRCH
 A process issued a PMC operation request without having allocated any
 PMCs.
@@ -673,21 +673,15 @@
 from all of its target processes.
 .It Bq Er ESRCH
 A
-.Ic PMC_OP_PMCATTACH
-request specified a non-existent process id.
+.Dv PMC_OP_PMCATTACH
+request specified a non-existent process ID.
 .It Bq Er ESRCH
 The target process for a
-.Ic PMC_OP_PMCDETACH
+.Dv PMC_OP_PMCDETACH
 operation is not being monitored by the
 .Nm
 driver.
 .El
-.Sh BUGS
-The driver samples the state of the kernel's logical processor support
-at the time of initialization (i.e., at module load time).
-On CPUs supporting logical processors, the driver could misbehave if
-logical processors are subsequently enabled or disabled while the
-driver is active.
 .Sh SEE ALSO
 .Xr kenv 1 ,
 .Xr pmc 3 ,
@@ -697,3 +691,9 @@
 .Xr pmcstat 8 ,
 .Xr sysctl 8 ,
 .Xr p_candebug 9
+.Sh BUGS
+The driver samples the state of the kernel's logical processor support
+at the time of initialization (i.e., at module load time).
+On CPUs supporting logical processors, the driver could misbehave if
+logical processors are subsequently enabled or disabled while the
+driver is active.

==== //depot/projects/hammer/sys/kern/subr_smp.c#26 (text+ko) ====

@@ -33,7 +33,9 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.195 2005/04/30 20:00:59 dwhite Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.196 2005/06/30 03:38:10 peter Exp $");
+
+#include "opt_kdb.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506300400.j5U403D8071464>