freebsd-nq/lib/libpmc/pmc.p6.3
2008-09-17 04:13:14 +00:00

955 lines
30 KiB
Groff

.\" Copyright (c) 2003-2008 Joseph Koshy. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" This software is provided by Joseph Koshy ``as is'' and
.\" any express or implied warranties, including, but not limited to, the
.\" implied warranties of merchantability and fitness for a particular purpose
.\" are disclaimed. in no event shall Joseph Koshy be liable
.\" for any direct, indirect, incidental, special, exemplary, or consequential
.\" damages (including, but not limited to, procurement of substitute goods
.\" or services; loss of use, data, or profits; or business interruption)
.\" however caused and on any theory of liability, whether in contract, strict
.\" liability, or tort (including negligence or otherwise) arising in any way
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
.\" $FreeBSD$
.\"
.Dd September 16, 2008
.Os
.Dt PMC.P6 3
.Sh NAME
.Nm pmc.p6
.Nd measurement events for
.Tn Intel
Pentium Pro, P-II, P-III family CPUs
.Sh LIBRARY
.Lb libpmc
.Sh SYNOPSIS
.In pmc.h
.Sh DESCRIPTION
Intel P6 PMCs are present in Intel
.Tn "Pentium Pro" ,
.Tn "Pentium II" ,
.Tn Celeron ,
.Tn "Pentium III"
and
.Tn "Pentium M"
processors.
.Pp
They are documented in
.Rs
.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
.%T "Volume 3: System Programming Guide"
.%N "Order Number 245472-012"
.%D 2003
.%Q "Intel Corporation"
.Re
.Pp
Some of these events are affected by processor errata described in
.Rs
.%B "Intel(R) Pentium(R) III Processor Specification Update"
.%N "Document Number: 244453-054"
.%D "April 2005"
.%Q "Intel Corporation"
.Re
.Ss PMC Features
These CPUs have two counters, each 40 bits wide.
Some events may only be used on specific counters and some events are
defined only on specific processor models.
These PMCs support the following capabilities:
.Bl -column "PMC_CAP_INTERRUPT" "Support"
.It Em Capability Ta Em Support
.It PMC_CAP_CASCADE Ta \&No
.It PMC_CAP_EDGE Ta Yes
.It PMC_CAP_INTERRUPT Ta Yes
.It PMC_CAP_INVERT Ta Yes
.It PMC_CAP_READ Ta Yes
.It PMC_CAP_PRECISE Ta \&No
.It PMC_CAP_SYSTEM Ta Yes
.It PMC_CAP_TAGGING Ta \&No
.It PMC_CAP_THRESHOLD Ta Yes
.It PMC_CAP_USER Ta Yes
.It PMC_CAP_WRITE Ta Yes
.El
.Ss Event Qualifiers
Event specifiers for Intel P6 PMCs can have the following common
qualifiers:
.Bl -tag -width indent
.It Li cmask= Ns Ar value
Configure the PMC to increment only if the number of configured
events measured in a cycle is greater than or equal to
.Ar value .
.It Li edge
Configure the PMC to count the number of deasserted to asserted
transitions of the conditions expressed by the other qualifiers.
If specified, the counter will increment only once whenever a
condition becomes true, irrespective of the number of clocks during
which the condition remains true.
.It Li inv
Invert the sense of comparision when the
.Dq Li cmask
qualifier is present, making the counter increment when the number of
events per cycle is less than the value specified by the
.Dq Li cmask
qualifier.
.It Li os
Configure the PMC to count events happening at processor privilege
level 0.
.It Li umask= Ns Ar value
This qualifier is used to further qualify the event selected (see
below).
.It Li usr
Configure the PMC to count events occurring at privilege levels 1, 2
or 3.
.El
.Pp
If neither of the
.Dq Li os
or
.Dq Li usr
qualifiers are specified, the default is to enable both.
.Pp
The event specifiers supported by Intel P6 PMCs are:
.Bl -tag -width indent
.It Li p6-baclears
Count the number of times a static branch prediction was made by the
branch decoder because the BTB did not have a prediction.
.It Li p6-br-bac-missp-exec
.Pq Tn "Pentium M"
Count the number of branch instructions executed that where
mispredicted at the Front End (BAC).
.It Li p6-br-bogus
Count the number of bogus branches.
.It Li p6-br-call-exec
.Pq Tn "Pentium M"
Count the number of call instructions executed.
.It Li p6-br-call-missp-exec
.Pq Tn "Pentium M"
Count the number of call instructions executed that were mispredicted.
.It Li p6-br-cnd-exec
.Pq Tn "Pentium M"
Count the number of conditional branch instructions executed.
.It Li p6-br-cnd-missp-exec
.Pq Tn "Pentium M"
Count the number of conditional branch instructions executed that were
mispredicted.
.It Li p6-br-ind-call-exec
.Pq Tn "Pentium M"
Count the number of indirect call instructions executed.
.It Li p6-br-ind-exec
.Pq Tn "Pentium M"
Count the number of indirect branch instructions executed.
.It Li p6-br-ind-missp-exec
.Pq Tn "Pentium M"
Count the number of indirect branch instructions executed that were
mispredicted.
.It Li p6-br-inst-decoded
Count the number of branch instructions decoded.
.It Li p6-br-inst-exec
.Pq Tn "Pentium M"
Count the number of branch instructions executed but necessarily retired.
.It Li p6-br-inst-retired
Count the number of branch instructions retired.
.It Li p6-br-miss-pred-retired
Count the number of mispredicted branch instructions retired.
.It Li p6-br-miss-pred-taken-ret
Count the number of taken mispredicted branches retired.
.It Li p6-br-missp-exec
.Pq Tn "Pentium M"
Count the number of branch instructions executed that were
mispredicted at execution.
.It Li p6-br-ret-bac-missp-exec
.Pq Tn "Pentium M"
Count the number of return instructions executed that were
mispredicted at the Front End (BAC).
.It Li p6-br-ret-exec
.Pq Tn "Pentium M"
Count the number of return instructions executed.
.It Li p6-br-ret-missp-exec
.Pq Tn "Pentium M"
Count the number of return instructions executed that were
mispredicted at execution.
.It Li p6-br-taken-retired
Count the number of taken branches retired.
.It Li p6-btb-misses
Count the number of branches for which the BTB did not produce a
prediction.
.It Li p6-bus-bnr-drv
Count the number of bus clock cycles during which this processor is
driving the BNR# pin.
.It Li p6-bus-data-rcv
Count the number of bus clock cycles during which this processor is
receiving data.
.It Li p6-bus-drdy-clocks Op Li ,umask= Ns Ar qualifier
Count the number of clocks during which DRDY# is asserted.
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-hit-drv
Count the number of bus clock cycles during which this processor is
driving the HIT# pin.
.It Li p6-bus-hitm-drv
Count the number of bus clock cycles during which this processor is
driving the HITM# pin.
.It Li p6-bus-lock-clocks Op Li ,umask= Ns Ar qualifier
Count the number of clocks during with LOCK# is asserted on the
external system bus.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-req-outstanding
Count the number of bus requests outstanding in any given cycle.
.It Li p6-bus-snoop-stall
Count the number of clock cycles during which the bus is snoop stalled.
.It Li p6-bus-tran-any Op Li ,umask= Ns Ar qualifier
Count the number of completed bus transactions of any kind.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-brd Op Li ,umask= Ns Ar qualifier
Count the number of burst read transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-burst Op Li ,umask= Ns Ar qualifier
Count the number of completed burst transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-def Op Li ,umask= Ns Ar qualifier
Count the number of completed deferred transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-ifetch Op Li ,umask= Ns Ar qualifier
Count the number of completed instruction fetch transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-inval Op Li ,umask= Ns Ar qualifier
Count the number of completed invalidate transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-mem Op Li ,umask= Ns Ar qualifier
Count the number of completed memory transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-pwr Op Li ,umask= Ns Ar qualifier
Count the number of completed partial write transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-tran-rfo Op Li ,umask= Ns Ar qualifier
Count the number of completed read-for-ownership transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-trans-io Op Li ,umask= Ns Ar qualifier
Count the number of completed I/O transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-trans-p Op Li ,umask= Ns Ar qualifier
Count the number of completed partial transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-bus-trans-wb Op Li ,umask= Ns Ar qualifier
Count the number of completed write-back transactions.
An additional qualifier may be specified and comprises one of the following
keywords:
.Pp
.Bl -tag -width indent -compact
.It Li any
Count transactions generated by any agent on the bus.
.It Li self
Count transactions generated by this processor.
.El
.Pp
The default is to count operations generated by this processor.
.It Li p6-cpu-clk-unhalted
Count the number of cycles during with the processor was not halted.
.Pp
.Pq Tn "Pentium M"
Count the number of cycles during with the processor was not halted
and not in a thermal trip.
.It Li p6-cycles-div-busy
Count the number of cycles during which the divider is busy and cannot
accept new divides.
This event is only allocated on counter 0.
.It Li p6-cycles-in-pending-and-masked
Count the number of processor cycles for which interrupts were
disabled and interrupts were pending.
.It Li p6-cycles-int-masked
Count the number of processor cycles for which interrupts were
disabled.
.It Li p6-data-mem-refs
Count all loads and all stores using any memory type, including
internal retries.
Each part of a split store is counted separately.
.It Li p6-dcu-lines-in
Count the total lines allocated in the data cache unit.
.It Li p6-dcu-m-lines-in
Count the number of M state lines allocated in the data cache unit.
.It Li p6-dcu-m-lines-out
Count the number of M state lines evicted from the data cache unit.
.It Li p6-dcu-miss-outstanding
Count the weighted number of cycles while a data cache unit miss is
outstanding, incremented by the number of outstanding cache misses at
any time.
.It Li p6-div
Count the number of integer and floating-point divides including
speculative divides.
This event is only allocated on counter 1.
.It Li p6-emon-esp-uops
.Pq Tn "Pentium M"
Count the total number of micro-ops.
.It Li p6-emon-est-trans Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium M"
Count the number of
.Tn "Enhanced Intel SpeedStep"
transitions.
An additional qualifier may be specified, and can be one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li all
Count all transitions.
.It Li freq
Count only frequency transitions.
.El
.Pp
The default is to count all transitions.
.It Li p6-emon-fused-uops-ret Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium M"
Count the number of retired fused micro-ops.
An additional qualifier may be specified, and may be one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li all
Count all fused micro-ops.
.It Li loadop
Count only load and op micro-ops.
.It Li stdsta
Count only STD/STA micro-ops.
.El
.Pp
The default is to count all fused micro-ops.
.It Li p6-emon-kni-comp-inst-ret
.Pq Tn "Pentium III"
Count the number of SSE computational instructions retired.
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li packed-and-scalar
Count packed and scalar operations.
.It Li scalar
Count scalar operations only.
.El
.Pp
The default is to count packed and scalar operations.
.It Li p6-emon-kni-inst-retired Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium III"
Count the number of SSE instructions retired.
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li packed-and-scalar
Count packed and scalar operations.
.It Li scalar
Count scalar operations only.
.El
.Pp
The default is to count packed and scalar operations.
.It Li p6-emon-kni-pref-dispatched Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium III"
Count the number of SSE prefetch or weakly ordered instructions
dispatched (including speculative prefetches).
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li nta
Count non-temporal prefetches.
.It Li t1
Count prefetches to L1.
.It Li t2
Count prefetches to L2.
.It Li wos
Count weakly ordered stores.
.El
.Pp
The default is to count non-temporal prefetches.
.It Li p6-emon-kni-pref-miss Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium III"
Count the number of prefetch or weakly ordered instructions that miss
all caches.
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li nta
Count non-temporal prefetches.
.It Li t1
Count prefetches to L1.
.It Li t2
Count prefetches to L2.
.It Li wos
Count weakly ordered stores.
.El
.Pp
The default is to count non-temporal prefetches.
.It Li p6-emon-pref-rqsts-dn
.Pq Tn "Pentium M"
Count the number of downward prefetches issued.
.It Li p6-emon-pref-rqsts-up
.Pq Tn "Pentium M"
Count the number of upward prefetches issued.
.It Li p6-emon-simd-instr-retired
.Pq Tn "Pentium M"
Count the number of retired
.Tn MMX
instructions.
.It Li p6-emon-sse-sse2-comp-inst-retired Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium M"
Count the number of computational SSE instructions retired.
An additional qualifier may be specified and can be one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li sse-packed-single
Count SSE packed-single instructions.
.It Li sse-scalar-single
Count SSE scalar-single instructions.
.It Li sse2-packed-double
Count SSE2 packed-double instructions.
.It Li sse2-scalar-double
Count SSE2 scalar-double instructions.
.El
.Pp
The default is to count SSE packed-single instructions.
.It Li p6-emon-sse-sse2-inst-retired Op Li ,umask= Ns Ar qualifer
.Pp
.Pq Tn "Pentium M"
Count the number of SSE instructions retired.
An additional qualifier can be specified, and can be one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li sse-packed-single
Count SSE packed-single instructions.
.It Li sse-packed-single-scalar-single
Count SSE packed-single and scalar-single instructions.
.It Li sse2-packed-double
Count SSE2 packed-double instructions.
.It Li sse2-scalar-double
Count SSE2 scalar-double instructions.
.El
.Pp
The default is to count SSE packed-single instructions.
.It Li p6-emon-synch-uops
.Pq Tn "Pentium M"
Count the number of sync micro-ops.
.It Li p6-emon-thermal-trip
.Pq Tn "Pentium M"
Count the duration or occurrences of thermal trips.
Use the
.Dq Li edge
qualifier to count occurrences of thermal trips.
.It Li p6-emon-unfusion
.Pq Tn "Pentium M"
Count the number of unfusion events in the reorder buffer.
.It Li p6-flops
Count the number of computational floating point operations retired.
This event is only allocated on counter 0.
.It Li p6-fp-assist
Count the number of floating point exceptions handled by microcode.
This event is only allocated on counter 1.
.It Li p6-fp-comps-ops-exe
Count the number of computation floating point operations executed.
This event is only allocated on counter 0.
.It Li p6-fp-mmx-trans Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of transitions between MMX and floating-point
instructions.
An additional qualifier may be specified, and comprises one of the
following keywords:
.Pp
.Bl -tag -width indent -compact
.It Li mmxtofp
Count transitions from MMX instructions to floating-point instructions.
.It Li fptommx
Count transitions from floating-point instructions to MMX instructions.
.El
.Pp
The default is to count MMX to floating-point transitions.
.It Li p6-hw-int-rx
Count the number of hardware interrupts received.
.It Li p6-ifu-fetch
Count the number of instruction fetches, both cacheable and non-cacheable.
.It Li p6-ifu-fetch-miss
Count the number of instruction fetch misses (i.e., those that produce
memory accesses).
.It Li p6-ifu-mem-stall
Count the number of cycles instruction fetch is stalled for any reason.
.It Li p6-ild-stall
Count the number of cycles the instruction length decoder is stalled.
.It Li p6-inst-decoded
Count the number of instructions decoded.
.It Li p6-inst-retired
Count the number of instructions retired.
.It Li p6-itlb-miss
Count the number of instruction TLB misses.
.It Li p6-l2-ads
Count the number of L2 address strobes.
.It Li p6-l2-dbus-busy
Count the number of cycles during which the L2 cache data bus was busy.
.It Li p6-l2-dbus-busy-rd
Count the number of cycles during which the L2 cache data bus was busy
transferring read data from L2 to the processor.
.It Li p6-l2-ifetch Op Li ,umask= Ns Ar qualifier
Count the number of L2 instruction fetches.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default is to count operations affecting all (MESI) state lines.
.It Li p6-l2-ld Op Li ,umask= Ns Ar qualifier
Count the number of L2 data loads.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li both
.Pq Tn "Pentium M"
Count both hardware-prefetched lines and non-hardware-prefetched lines.
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li hw
.Pq Tn "Pentium M"
Count hardware-prefetched lines only.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li nonhw
.Pq Tn "Pentium M"
Exclude hardware-prefetched lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default on processors other than
.Tn "Pentium M"
processors is to count operations affecting all (MESI) state lines.
The default on
.Tn "Pentium M"
processors is to count both hardware-prefetched and
non-hardware-prefetch operations on all (MESI) state lines.
.Pq Errata
This event is affected by processor errata E53.
.It Li p6-l2-lines-in Op Li ,umask= Ns Ar qualifier
Count the number of L2 lines allocated.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li both
.Pq Tn "Pentium M"
Count both hardware-prefetched lines and non-hardware-prefetched lines.
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li hw
.Pq Tn "Pentium M"
Count hardware-prefetched lines only.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li nonhw
.Pq Tn "Pentium M"
Exclude hardware-prefetched lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default on processors other than
.Tn "Pentium M"
processors is to count operations affecting all (MESI) state lines.
The default on
.Tn "Pentium M"
processors is to count both hardware-prefetched and
non-hardware-prefetch operations on all (MESI) state lines.
.Pq Errata
This event is affected by processor errata E45.
.It Li p6-l2-lines-out Op Li ,umask= Ns Ar qualifier
Count the number of L2 lines evicted.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li both
.Pq Tn "Pentium M"
Count both hardware-prefetched lines and non-hardware-prefetched lines.
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li hw
.Pq Tn "Pentium M"
Count hardware-prefetched lines only.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li nonhw
.Pq Tn "Pentium M" only
Exclude hardware-prefetched lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default on processors other than
.Tn "Pentium M"
processors is to count operations affecting all (MESI) state lines.
The default on
.Tn "Pentium M"
processors is to count both hardware-prefetched and
non-hardware-prefetch operations on all (MESI) state lines.
.Pq Errata
This event is affected by processor errata E45.
.It Li p6-l2-m-lines-inm
Count the number of modified lines allocated in L2 cache.
.It Li p6-l2-m-lines-outm Op Li ,umask= Ns Ar qualifier
Count the number of L2 M-state lines evicted.
.Pp
.Pq Tn "Pentium M"
On these processors an additional qualifier may be specified and
comprises a list of the following keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li both
Count both hardware-prefetched lines and non-hardware-prefetched lines.
.It Li hw
Count hardware-prefetched lines only.
.It Li nonhw
Exclude hardware-prefetched lines.
.El
.Pp
The default is to count both hardware-prefetched and
non-hardware-prefetch operations.
.Pq Errata
This event is affected by processor errata E53.
.It Li p6-l2-rqsts Op Li ,umask= Ns Ar qualifier
Count the total number of L2 requests.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default is to count operations affecting all (MESI) state lines.
.It Li p6-l2-st
Count the number of L2 data stores.
An additional qualifier may be specified and comprises a list of the following
keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li e
Count operations affecting E (exclusive) state lines.
.It Li i
Count operations affecting I (invalid) state lines.
.It Li m
Count operations affecting M (modified) state lines.
.It Li s
Count operations affecting S (shared) state lines.
.El
.Pp
The default is to count operations affecting all (MESI) state lines.
.It Li p6-ld-blocks
Count the number of load operations delayed due to store buffer blocks.
.It Li p6-misalign-mem-ref
Count the number of misaligned data memory references (crossing a 64
bit boundary).
.It Li p6-mmx-assist
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of MMX assists executed.
.It Li p6-mmx-instr-exec
.Pq Tn Celeron , Tn "Pentium II"
Count the number of MMX instructions executed, except MOVQ and MOVD
stores from register to memory.
.It Li p6-mmx-instr-ret
.Pq Tn "Pentium II"
Count the number of MMX instructions retired.
.It Li p6-mmx-instr-type-exec Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of MMX instructions executed.
An additional qualifier may be specified and comprises a list of
the following keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li pack
Count MMX pack operation instructions.
.It Li packed-arithmetic
Count MMX packed arithmetic instructions.
.It Li packed-logical
Count MMX packed logical instructions.
.It Li packed-multiply
Count MMX packed multiply instructions.
.It Li packed-shift
Count MMX packed shift instructions.
.It Li unpack
Count MMX unpack operation instructions.
.El
.Pp
The default is to count all operations.
.It Li p6-mmx-sat-instr-exec
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of MMX saturating instructions executed.
.It Li p6-mmx-uops-exec
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of MMX micro-ops executed.
.It Li p6-mul
Count the number of integer and floating-point multiplies, including
speculative multiplies.
This event is only allocated on counter 1.
.It Li p6-partial-rat-stalls
Count the number of cycles or events for partial stalls.
.It Li p6-resource-stalls
Count the number of cycles there was a resource related stall of any kind.
.It Li p6-ret-seg-renames
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of segment register rename events retired.
.It Li p6-sb-drains
Count the number of cycles the store buffer is draining.
.It Li p6-seg-reg-renames Op Li ,umask= Ns Ar qualifier
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of segment register renames.
An additional qualifier may be specified, and comprises a list of the
following keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li ds
Count renames for segment register DS.
.It Li es
Count renames for segment register ES.
.It Li fs
Count renames for segment register FS.
.It Li gs
Count renames for segment register GS.
.El
.Pp
The default is to count operations affecting all segment registers.
.It Li p6-seg-rename-stalls
.Pq Tn "Pentium II" , Tn "Pentium III"
Count the number of segment register renaming stalls.
An additional qualifier may be specified, and comprises a list of the
following keywords separated by
.Ql +
characters:
.Pp
.Bl -tag -width indent -compact
.It Li ds
Count stalls for segment register DS.
.It Li es
Count stalls for segment register ES.
.It Li fs
Count stalls for segment register FS.
.It Li gs
Count stalls for segment register GS.
.El
.Pp
The default is to count operations affecting all the segment registers.
.It Li p6-segment-reg-loads
Count the number of segment register loads.
.It Li p6-uops-retired
Count the number of micro-ops retired.
.El
.Ss Event Name Aliases
The following table shows the mapping between the PMC-independent
aliases supported by
.Lb libpmc
and the underlying hardware events used.
.Bl -column "branch-mispredicts" "Description"
.It Em Alias Ta Em Event
.It Li branches Ta Li p6-br-inst-retired
.It Li branch-mispredicts Ta Li p6-br-miss-pred-retired
.It Li dc-misses Ta Li p6-dcu-lines-in
.It Li ic-misses Ta Li p6-ifu-fetch-miss
.It Li instructions Ta Li p6-inst-retired
.It Li interrupts Ta Li p6-hw-int-rx
.It Li unhalted-cycles Ta Li p6-cpu-clk-unhalted
.El
.Sh SEE ALSO
.Xr pmc 3 ,
.Xr pmc.k7 3 ,
.Xr pmc.k8 3 ,
.Xr pmc.p4 3 ,
.Xr pmc.p5 3 ,
.Xr pmc.tsc 3 ,
.Xr pmclog 3 ,
.Xr hwpmc 4
.Sh HISTORY
The
.Nm pmc
library first appeared in
.Fx 6.0 .
.Sh AUTHORS
The
.Lb libpmc
library was written by
.An "Joseph Koshy"
.Aq jkoshy@FreeBSD.org .