GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PMC.CORE(3) FreeBSD Library Functions Manual PMC.CORE(3)

pmc.core
measurement events for Intel Core Solo and Core Duo family CPUs

Performance Counters Library (libpmc, -lpmc)

#include <pmc.h>

Intel Core Solo and Core Duo CPUs contain PMCs conforming to version 1 of the Intel performance measurement architecture.

These PMCs are documented in Volume 3: System Programming Guide, IA-32 Intel® Architecture Software Developer's Manual, Order Number 253669-027US, Intel Corporation, July 2008.

CPUs conforming to version 1 of the Intel performance measurement architecture contain two programmable PMCs of class PMC_CLASS_IAP. The PMCs are 40 bits width and offer the following capabilities:
Capability Support
PMC_CAP_CASCADE No
PMC_CAP_EDGE Yes
PMC_CAP_INTERRUPT Yes
PMC_CAP_INVERT Yes
PMC_CAP_READ Yes
PMC_CAP_PRECISE No
PMC_CAP_SYSTEM Yes
PMC_CAP_TAGGING No
PMC_CAP_THRESHOLD Yes
PMC_CAP_USER Yes
PMC_CAP_WRITE Yes

Event specifiers for these PMCs support the following common qualifiers:
value
Configure the PMC to increment only if the number of configured events measured in a cycle is greater than or equal to value.
Configure the PMC to count the number of de-asserted 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.
Invert the sense of comparison when the “cmask” qualifier is present, making the counter increment when the number of events per cycle is less than the value specified by the “cmask” qualifier.
Configure the PMC to count events happening at processor privilege level 0.
Configure the PMC to count events occurring at privilege levels 1, 2 or 3.

If neither of the “os” or “usr” qualifiers are specified, the default is to enable both.

Events that require core-specificity to be specified use a additional qualifier “core=value”, where argument value is one of:

Measure event conditions on all cores.
Measure event conditions on this core.
The default is “this”.

Events that require an agent qualifier to be specified use an additional qualifier “agent=value”, where argument value is one of:

Measure events associated with this bus agent.
Measure events caused by any bus agent.
The default is “this”.

Events that require a hardware prefetch qualifier to be specified use an additional qualifier “prefetch=value”, where argument value is one of:

Include all prefetches.
Only count hardware prefetches.
Exclude hardware prefetches.
The default is “both”.

Events that require a cache coherence qualifier to be specified use an additional qualifier “cachestate=value”, where argument value contains one or more of the following letters:

Count cache lines in the exclusive state.
Count cache lines in the invalid state.
Count cache lines in the modified state.
Count cache lines in the shared state.
The default is “eims”.

The following event names are case insensitive. Whitespace, hyphens and underscore characters in these names are ignored.

Core PMCs support the following events:

(Event E6H, Umask 00H) The number of BAClear conditions asserted.
(Event E2H, Umask 00H) The number of branches for which the branch table buffer did not produce a prediction.
(Event 8AH, Umask 00H) The number of branch instructions executed that were mispredicted at the front end.
(Event E4H, Umask 00H) The number of bogus branches.
(Event 92H, Umask 00H) The number of CALL instructions executed.
(Event 93H, Umask 00H) The number of CALL instructions executed that were mispredicted.
(Event 8BH, Umask 00H) The number of conditional branch instructions executed.
(Event 8CH, Umask 00H) The number of conditional branch instructions executed that were mispredicted.
(Event 94H, Umask 00H) The number of indirect CALL instructions executed.
(Event 8DH, Umask 00H) The number of indirect branches executed.
(Event 8EH, Umask 00H) The number of indirect branch instructions executed that were mispredicted.
(Event 88H, Umask 00H) The number of branch instructions executed including speculative branches.
(Event E0H, Umask 00H) The number of branch instructions decoded.
(Event C4H, Umask 00H) (Alias “Branch Instruction Retired”) The number of branch instructions retired. This is an architectural performance event.
(Event C5H, Umask 00H) (Alias “Branch Misses Retired”) The number of mispredicted branch instructions retired. This is an architectural performance event.
(Event CAH, Umask 00H) The number of taken and mispredicted branches retired.
(Event 89H, Umask 00H) The number of branch instructions executed and mispredicted at execution including branches that were not predicted.
(Event 91H, Umask 00H) The number of return branch instructions that were mispredicted at the front end.
(Event 8FH, Umask 00H) The number of return branch instructions executed.
(Event 90H, Umask 00H) The number of return branch instructions executed that were mispredicted.
(Event C9H, Umask 00H) The number of taken branches retired.
(Event 61H, Umask 00H) The number of external bus cycles while BNR (bus not ready) was asserted.
[,agent=agent]
(Event 62H, Umask 00H) The number of external bus cycles while DRDY was asserted.
(Event 64H, Umask 40H) The number of cycles during which the processor is busy receiving data.
[,core=core]
(Event 63H) The number of external bus cycles while the bus lock signal was asserted.
[,core=core]
(Event 7DH) The number of cycles when there is no transaction from the core.
[,agent=agent] [,core=core]
(Event 60H) The weighted cycles of cacheable bus data read requests from the data cache unit or hardware prefetcher.
(Event 7EH, Umask 00H) The number bus cycles while a bus snoop is stalled.
[,agent=agent] [,cachestate=mesi]
(Event 77H) The number of snoop responses to bus transactions.
[,agent=agent]
(Event 70H) The number of completed bus transactions.
[,core=core]
(Event 65H) The number of read bus transactions.
[,agent=agent]
(Event 6EH) The number of completed burst transactions. Retried transactions may be counted more than once.
[,core=core]
(Event 6DH) The number of completed deferred transactions.
[,agent=agent] [,core=core]
(Event 6CH) The number of completed I/O transactions counting both reads and writes.
[,agent=agent] [,core=core]
(Event 68H) Completed instruction fetch transactions.
[,agent=agent] [,core=core]
(Event 69H) The number completed invalidate transactions.
[,agent=agent]
(Event 6FH) The number of completed memory transactions.
[,agent=agent] [,core=core]
(Event 6BH) The number of completed partial transactions.
[,agent=agent] [,core=core]
(Event 6AH) The number of completed partial write transactions.
[,agent=agent] [,core=core]
(Event 66H) The number of completed read-for-ownership transactions.
[,agent=agent]
(Event 67H) The number of completed write-back transactions from the data cache unit, excluding L2 write-backs.
(Event 14H, Umask 00H) The number of cycles the divider is busy. The event is only available on PMC0.
(Event C6H, Umask 00H) The number of cycles while interrupts were disabled.
(Event C7H, Umask 00H) The number of cycles while interrupts were disabled and interrupts were pending.
[,core=core]
(Event 78H) The number of data cache unit snoops to L1 cache lines in the shared state.
[,cachestate=mesi]
(Event 42H) The number of cacheable locked read operations to invalid state.
[,cachestate=mesi]
(Event 40H) The number of cacheable L1 data read operations.
[,cachestate=mesi]
(Event 41H) The number cacheable L1 data write operations.
(Event 47H, Umask 00H) The number of M state data cache lines that were evicted.
(Event 46H, Umask 00H) The number of M state data cache lines that were allocated.
(Event 48H, Umask 00H) The weighted cycles an L1 miss was outstanding.
(Event 45H, Umask 0FH) The number of data cache line replacements.
(Event 44H, Umask 02H) The number of cacheable read and write operations to L1 data cache.
(Event 43H, Umask 01H) The number of L1 data reads and writes, both cacheable and un-cacheable.
[,core=core]
(Event 22H) The number of core cycles during which the data bus was busy.
[,core=core]
(Event 23H) The number of cycles during which the data bus was busy transferring data to a core.
(Event 13H, Umask 00H) The number of divide operations including speculative operations for integer and floating point divides. This event can only be counted on PMC1.
(Event 49H, Umask 00H) The number of data references that missed the TLB.
(Event D7H, Umask 00H) The number of ESP folding instructions decoded.
[,trans=transition]
(Event 3AH) Count the number of Intel Enhanced SpeedStep transitions. The argument transition can be one of the following values:
(Umask 00H) Count all transitions.
(Umask 01H) Count frequency transitions.
The default is “any”.
(Event 11H, Umask 00H) The number of floating point operations that required microcode assists. The event is only available on PMC1.
(Event C1H, Umask 00H) The number of X87 floating point compute instructions retired. The event is only available on PMC0.
(Event 10H, Umask 00H) The number of floating point computational instructions executed.
(Event CCH, Umask 01H) The number of transitions from X87 to MMX.
(Event DAH, Umask 01H) The number of fused load uops retired.
(Event DAH, Umask 02H) The number of fused store uops retired.
(Event DAH, Umask 00H) The number of fused uops retired.
(Event C8H, Umask 00H) The number of hardware interrupts received.
(Event 81H, Umask 00H) The number of instruction fetch misses in the instruction cache and streaming buffers.
(Event 80H, Umask 00H) The number of instruction fetches from the instruction cache and streaming buffers counting both cacheable and un-cacheable fetches.
(Event 86H, Umask 00H) The number of cycles the instruction fetch unit was stalled while waiting for data from memory.
(Event 87H, Umask 00H) The number of instruction length decoder stalls.
(Event 85H, Umask 00H) The number of instruction TLB misses.
(Event D0H, Umask 00H) The number of instructions decoded.
(Event C0H, Umask 00H) (Alias “Instruction Retired”) The number of instructions retired. This is an architectural performance event.
(Event 4FH, Umask 00H) The number of L1 prefetch request due to data cache misses.
[,core=core]
(Event 21H) The number of L2 address strobes.
[,cachestate=mesi] [,core=core]
(Event 28H) The number of instruction fetches by the instruction fetch unit from L2 cache including speculative fetches.
[,cachestate=mesi] [,core=core]
(Event 29H) The number of L2 cache reads.
[,core=core] [,prefetch=prefetch]
(Event 24H) The number of L2 cache lines allocated.
[,core=core] [,prefetch=prefetch]
(Event 26H) The number of L2 cache lines evicted.
[,core=core]
(Event 25H) The number of L2 M state cache lines allocated.
[,core=core] [,prefetch=prefetch]
(Event 27H) The number of L2 M state cache lines evicted.
[,cachestate=mesi] [,core=core] [,prefetch=prefetch]
(Event 32H) The number of cycles there was no request to access L2 cache.
[,cachestate=mesi] [,core=core] [,prefetch=prefetch]
(Event 30H) The number of cycles the L2 cache was busy and rejecting new requests.
[,cachestate=mesi] [,core=core] [,prefetch=prefetch]
(Event 2EH) The number of L2 cache requests.
[,cachestate=mesi] [,core=core]
(Event 2AH) The number of L2 cache writes including speculative writes.
(Event 03H, Umask 00H) The number of load operations delayed due to store buffer blocks.
(Event 2EH, Umask 41H) The number of cache misses for references to the last level cache, excluding misses due to hardware prefetches. This is an architectural performance event.
The number of references to the last level cache, excluding those due to hardware prefetches. This is an architectural performance event. (Event 2EH, Umask 4FH) This is an architectural performance event.
(Event CDH, Umask 00H) The number of EMMX instructions executed.
(Event CCH, Umask 00H) The number of transitions from MMX to X87.
(Event B0H, Umask 00H) The number of MMX instructions executed excluding MOVQ and MOVD stores.
(Event CEH, Umask 00H) The number of MMX instructions retired.
(Event 05H, Umask 00H) The number of misaligned data memory references, counting loads and stores.
(Event 12H, Umask 00H) The number of multiply operations include speculative floating point and integer multiplies. This event is available on PMC1 only.
(Event 3CH, Umask 01H) (Alias “Unhalted Reference Cycles”) The number of non-halted bus cycles. This is an architectural performance event.
(Event F8H, Umask 00H) The number of hardware prefetch requests issued in backward streams.
(Event F0H, Umask 00H) The number of hardware prefetch requests issued in forward streams.
(Event A2H, Umask 00H) The number of cycles where there is a resource related stall.
(Event 04H, Umask 00H) The number of cycles while draining store buffers.
(Event D8H, Umask 02H) The number of SSE/SSE2 packed double precision instructions retired.
(Event D9H, Umask 02H) The number of SSE/SSE2 packed double precision compute instructions retired.
(Event D8H, Umask 03H) The number of SSE/SSE2 scalar double precision instructions retired.
(Event D9H, Umask 03H) The number of SSE/SSE2 scalar double precision compute instructions retired.
(Event D9H, Umask 00H) The number of SSE/SSE2 packed single precision compute instructions retired.
(Event D8H, Umask 00H) The number of SSE/SSE2 scalar single precision instructions retired, both packed and scalar.
(Event D8H, Umask 01H) The number of SSE/SSE2 scalar single precision instructions retired.
(Event D9H, Umask 01H) The number of SSE/SSE2 single precision compute instructions retired.
(Event D8H, Umask 04H) The number of SSE2 128-bit integer instructions retired.
(Event B3H, Umask 20H) The number of SIMD integer packed arithmetic instructions executed.
(Event B3H, Umask 04H) The number of SIMD integer pack operations instructions executed.
(Event B3H, Umask 10H) The number of SIMD integer packed logical instructions executed.
(Event B3H, Umask 01H) The number of SIMD integer packed multiply instructions executed.
(Event B3H, Umask 02H) The number of SIMD integer packed shift instructions executed.
(Event B1H, Umask 00H) The number of SIMD integer saturating instructions executed.
(Event B3H, Umask 08H) The number of SIMD integer unpack instructions executed.
(Event C3H, Umask 00H) The number of times self-modifying code was detected.
(Event 4BH, Umask 03H) The number of times an SSE streaming store instruction missed all caches.
(Event 07H, Umask 03H) The number of SSE streaming store instructions executed.
(Event 4BH, Umask 00H) The number of times PREFETCHNTA missed all caches.
(Event 07H, Umask 00H) The number of PREFETCHNTA instructions retired.
(Event 4BH, Umask 01H) The number of times PREFETCHT1 missed all caches.
(Event 07H, Umask 01H) The number of PREFETCHT1 instructions retired.
(Event 4BH, Umask 02H) The number of times PREFETCHNT2 missed all caches.
(Event 07H, Umask 02H) The number of PREFETCHT2 instructions retired.
(Event 06H, Umask 00H) The number of segment register loads.
(Event 3CH, Umask 02H) The number of non-halted bus cycles of this code while the other core was halted.
(Event 3BH, Umask C0H) The duration in a thermal trip based on the current core clock.
(Event DBH, Umask 00H) The number of unfusion events.
(Event 3CH, Umask 00H) The number of core clock cycles when the clock signal on a specific core is not halted. This is an architectural performance event.
(Event C2H, Umask 00H) The number of micro-ops retired.

The following table shows the mapping between the PMC-independent aliases supported by Performance Counters Library (libpmc, -lpmc) and the underlying hardware events used.
Alias Event
(unsupported)
(unsupported)

The following errata affect performance measurement on these processors. These errata are documented in Intel® CoreTM Duo Processor and Intel® CoreTM Solo Processor on 65 nm Process, Specification Update, Order Number 309222-017, Intel Corporation, July 2008.
AE19
Data prefetch performance monitoring events can only be enabled on a single core.
AE25
Performance monitoring counters that count external bus events may report incorrect values after processor power state transitions.
AE28
Performance monitoring events for retired floating point operations (C1H) may not be accurate.
AE29
DR3 address match on MOVD/MOVQ/MOVNTQ memory store instruction may incorrectly increment performance monitoring count for saturating SIMD instructions retired (Event CFH).
AE33
Hardware prefetch performance monitoring events may be counted inaccurately.
AE36
The CPU_CLK_UNHALTED performance monitoring event (Event 3CH) counts clocks when the processor is in the C1/C2 processor power states.
AE39
Certain performance monitoring counters related to bus, L2 cache and power management are inaccurate.
AE51
Performance monitoring events for retired instructions (Event C0H) may not be accurate.
AE67
Performance monitoring event FP_ASSIST may not be accurate.
AE78
Performance monitoring event for hardware prefetch requests (Event 4EH) and hardware prefetch request cache misses (Event 4FH) may not be accurate.
AE82
Performance monitoring event FP_MMX_TRANS_TO_MMX may not count some transitions.

pmc(3), pmc.atom(3), pmc.core2(3), pmc.iaf(3), pmc.k7(3), pmc.k8(3), pmc.soft(3), pmc.tsc(3), pmclog(3), hwpmc(4)

The pmc library first appeared in FreeBSD 6.0.

The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>.
November 12, 2008 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.