PMC.K7(3) | MidnightBSD Library Functions Manual | PMC.K7(3) |
pmc.k7
—
measurement events for AMD Athlon (K7 family)
CPUs
Performance Counters Library (libpmc, -lpmc)
#include
<pmc.h>
AMD K7 PMCs are present in the AMD Athlon series of CPUs and are documented in: AMD Athlon Processor x86 Code Optimization Guide, Publication No. 22007, Advanced Micro Devices, Inc., February 2002.
AMD K7 PMCs are 48 bits wide. Each K7 CPU contains 4 PMCs with 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 AMD K7 PMCs can have the following optional qualifiers:
count=
valueedge
inv
count
” qualifier is present, making
the counter to increment when the number of events per cycle is less than
the value specified by the “count
”
qualifier.os
unitmask=
maskk7-dc-refills-from-l2
”,
“k7-dc-refills-from-system
” and
“k7-dc-writebacks
”. Here
mask is a string of the following characters
optionally separated by ‘+
’
characters:
m
o
e
s
i
If no “unitmask
”
qualifier is specified, the default is to count events for caches lines
in any of the above states.
usr
If neither of the “os
” or
“usr
” qualifiers were specified, the
default is to enable both.
The event specifiers supported on AMD K7 PMCs are:
k7-dc-accesses
k7-dc-misses
k7-dc-refills-from-l2
[,unitmask=
mask]unitmask
” qualifier.k7-dc-refills-from-system
[,unitmask=
mask]unitmask
” qualifier.k7-dc-writebacks
[,unitmask=
mask]unitmask
”
qualifier.k7-hardware-interrupts
k7-ic-fetches
k7-ic-misses
k7-interrupts-masked-cycles
k7-interrupts-masked-while-pending-cycles
k7-l1-and-l2-dtlb-misses
k7-l1-dtlb-miss-and-l2-dtlb-hits
k7-l1-itlb-misses
k7-l1-l2-itlb-misses
k7-misaligned-references
k7-retired-branches
k7-retired-branches-mispredicted
k7-retired-far-control-transfers
k7-retired-instructions
k7-retired-ops
k7-retired-resync-branches
k7-retired-taken-branches
k7-retired-taken-branches-mispredicted
The following table shows the mapping between the PMC-independent aliases supported by Performance Counters Library (libpmc, -lpmc) and the underlying hardware events used.
pmc(3), pmc.atom(3), pmc.core(3), pmc.core2(3), pmc.iaf(3), pmc.k8(3), pmc.p4(3), pmc.p5(3), pmc.p6(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>.
October 4, 2008 | midnightbsd-3.1 |