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.K7(3) FreeBSD 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:
value
Configure the counter to increment only if the number of configured events measured in a cycle is greater than or equal to value.
Configure the counter to only count negated-to-asserted transitions of the conditions expressed by the other qualifiers. In other words, the counter will increment only once whenever a given condition becomes true, irrespective of the number of clocks during which the condition remains true.
Invert the sense of comparison when the “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.
Configure the PMC to count events happening at privilege level 0.
mask
This qualifier is used to further qualify a select few events, “k7-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:

Count operations for lines in the “Modified” state.
Count operations for lines in the “Owner” state.
Count operations for lines in the “Exclusive” state.
Count operations for lines in the “Shared” state.
Count operations for lines in the “Invalid” state.

If no “unitmask” qualifier is specified, the default is to count events for caches lines in any of the above states.

Configure the PMC to count events occurring at privilege levels 1, 2 or 3.

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:
(Event 40H) Count data cache accesses.
(Event 41H) Count data cache misses.
[,unitmask=mask]
(Event 42H) Count data cache refills from L2 cache. This event may be further qualified using the “unitmask” qualifier.
[,unitmask=mask]
(Event 43H) Count data cache refills from system memory. This event may be further qualified using the “unitmask” qualifier.
[,unitmask=mask]
(Event 44H) Count data cache writebacks. This event may be further qualified using the “unitmask” qualifier.
(Event CFH) Count the number of taken hardware interrupts.
(Event 80H) Count instruction cache fetches.
(Event 81H) Count instruction cache misses.
(Event CDH) Count the number of cycles when the processor's IF flag was zero.
(Event CEH) Count the number of cycles interrupts were masked while pending due to the processor's IF flag being zero.
(Event 46H) Count L1 and L2 DTLB misses.
(Event 45H) Count L1 DTLB misses and L2 DTLB hits.
(Event 84H) Count L1 ITLB misses that are L2 ITLB hits.
(Event 85H) Count L1 (and L2) ITLB misses.
(Event 47H) Count misaligned data references.
(Event C2H) Count all retired branches (conditional, unconditional, exceptions and interrupts).
(Event C3H) Count all mispredicted retired branches.
(Event C6H) Count retired far control transfers.
(Event C0H) Count all retired instructions.
(Event C1H) Count retired ops.
(Event C7H) Count retired resync branches (non control transfer branches).
(Event C4H) Count retired taken branches.
(Event C5H) Count mispredicted taken branches that were 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)

pmc(3), pmc.atom(3), pmc.core(3), pmc.core2(3), pmc.iaf(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>.
October 4, 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.