1cc0c1555SSean Bruno.\" Copyright (c) 2013 Hiren Panchasara <hiren.panchasara@gmail.com> 2cc0c1555SSean Bruno.\" All rights reserved. 3cc0c1555SSean Bruno.\" 4cc0c1555SSean Bruno.\" Redistribution and use in source and binary forms, with or without 5cc0c1555SSean Bruno.\" modification, are permitted provided that the following conditions 6cc0c1555SSean Bruno.\" are met: 7cc0c1555SSean Bruno.\" 1. Redistributions of source code must retain the above copyright 8cc0c1555SSean Bruno.\" notice, this list of conditions and the following disclaimer. 9cc0c1555SSean Bruno.\" 2. Redistributions in binary form must reproduce the above copyright 10cc0c1555SSean Bruno.\" notice, this list of conditions and the following disclaimer in the 11cc0c1555SSean Bruno.\" documentation and/or other materials provided with the distribution. 12cc0c1555SSean Bruno.\" 13cc0c1555SSean Bruno.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14cc0c1555SSean Bruno.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15cc0c1555SSean Bruno.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16cc0c1555SSean Bruno.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17cc0c1555SSean Bruno.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18cc0c1555SSean Bruno.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19cc0c1555SSean Bruno.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20cc0c1555SSean Bruno.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21cc0c1555SSean Bruno.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22cc0c1555SSean Bruno.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23cc0c1555SSean Bruno.\" SUCH DAMAGE. 24cc0c1555SSean Bruno.\" 25cc0c1555SSean Bruno.Dd March 22, 2013 26cc0c1555SSean Bruno.Dt PMC.HASWELLUC 3 27cc0c1555SSean Bruno.Os 28cc0c1555SSean Bruno.Sh NAME 29cc0c1555SSean Bruno.Nm pmc.haswelluc 30cc0c1555SSean Bruno.Nd uncore measurement events for 31cc0c1555SSean Bruno.Tn Intel 32cc0c1555SSean Bruno.Tn Haswell 33cc0c1555SSean Brunofamily CPUs 34cc0c1555SSean Bruno.Sh LIBRARY 35cc0c1555SSean Bruno.Lb libpmc 36cc0c1555SSean Bruno.Sh SYNOPSIS 37cc0c1555SSean Bruno.In pmc.h 38cc0c1555SSean Bruno.Sh DESCRIPTION 39cc0c1555SSean Bruno.Tn Intel 40cc0c1555SSean Bruno.Tn "Haswell" 41cc0c1555SSean BrunoCPUs contain PMCs conforming to version 3 of the 42cc0c1555SSean Bruno.Tn Intel 43cc0c1555SSean Brunoperformance measurement architecture. 44cc0c1555SSean BrunoThese CPUs contain two classes of PMCs: 45cc0c1555SSean Bruno.Bl -tag -width "Li PMC_CLASS_UCP" 46cc0c1555SSean Bruno.It Li PMC_CLASS_UCF 47cc0c1555SSean BrunoFixed-function counters that count only one hardware event per counter. 48cc0c1555SSean Bruno.It Li PMC_CLASS_UCP 49cc0c1555SSean BrunoProgrammable counters that may be configured to count one of a defined 50cc0c1555SSean Brunoset of hardware events. 51cc0c1555SSean Bruno.El 52cc0c1555SSean Bruno.Pp 53cc0c1555SSean BrunoThe number of PMCs available in each class and their widths need to be 54cc0c1555SSean Brunodetermined at run time by calling 55cc0c1555SSean Bruno.Xr pmc_cpuinfo 3 . 56cc0c1555SSean Bruno.Pp 57cc0c1555SSean BrunoIntel Haswell PMCs are documented in 58cc0c1555SSean Bruno.Rs 59cc0c1555SSean Bruno.%B "Intel(R) 64 and IA-32 Architectures Software Developers Manual" 60cc0c1555SSean Bruno.%T "Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C" 61cc0c1555SSean Bruno.%N "Order Number: 325462-045US" 62cc0c1555SSean Bruno.%D January 2013 63cc0c1555SSean Bruno.%Q "Intel Corporation" 64cc0c1555SSean Bruno.Re 65cc0c1555SSean Bruno.Ss HASWELL UNCORE FIXED FUNCTION PMCS 66cc0c1555SSean BrunoThese PMCs and their supported events are documented in 67cc0c1555SSean Bruno.Xr pmc.ucf 3 . 68cc0c1555SSean BrunoNot all CPUs in this family implement fixed-function counters. 69cc0c1555SSean Bruno.Ss HASWELL UNCORE PROGRAMMABLE PMCS 70cc0c1555SSean BrunoThe programmable PMCs support the following capabilities: 71cc0c1555SSean Bruno.Bl -column "PMC_CAP_INTERRUPT" "Support" 72cc0c1555SSean Bruno.It Em Capability Ta Em Support 73cc0c1555SSean Bruno.It PMC_CAP_CASCADE Ta \&No 74cc0c1555SSean Bruno.It PMC_CAP_EDGE Ta Yes 75cc0c1555SSean Bruno.It PMC_CAP_INTERRUPT Ta \&No 76cc0c1555SSean Bruno.It PMC_CAP_INVERT Ta Yes 77cc0c1555SSean Bruno.It PMC_CAP_READ Ta Yes 78cc0c1555SSean Bruno.It PMC_CAP_PRECISE Ta \&No 79cc0c1555SSean Bruno.It PMC_CAP_SYSTEM Ta \&No 80cc0c1555SSean Bruno.It PMC_CAP_TAGGING Ta \&No 81cc0c1555SSean Bruno.It PMC_CAP_THRESHOLD Ta Yes 82cc0c1555SSean Bruno.It PMC_CAP_USER Ta \&No 83cc0c1555SSean Bruno.It PMC_CAP_WRITE Ta Yes 84cc0c1555SSean Bruno.El 85cc0c1555SSean Bruno.Ss Event Qualifiers 86cc0c1555SSean BrunoEvent specifiers for these PMCs support the following common 87cc0c1555SSean Brunoqualifiers: 88cc0c1555SSean Bruno.Bl -tag -width indent 89cc0c1555SSean Bruno.It Li cmask= Ns Ar value 90cc0c1555SSean BrunoConfigure the PMC to increment only if the number of configured 91cc0c1555SSean Brunoevents measured in a cycle is greater than or equal to 92cc0c1555SSean Bruno.Ar value . 93cc0c1555SSean Bruno.It Li edge 94cc0c1555SSean BrunoConfigure the PMC to count the number of de-asserted to asserted 95cc0c1555SSean Brunotransitions of the conditions expressed by the other qualifiers. 96cc0c1555SSean BrunoIf specified, the counter will increment only once whenever a 97cc0c1555SSean Brunocondition becomes true, irrespective of the number of clocks during 98cc0c1555SSean Brunowhich the condition remains true. 99cc0c1555SSean Bruno.It Li inv 100cc0c1555SSean BrunoInvert the sense of comparison when the 101cc0c1555SSean Bruno.Dq Li cmask 102cc0c1555SSean Brunoqualifier is present, making the counter increment when the number of 103cc0c1555SSean Brunoevents per cycle is less than the value specified by the 104cc0c1555SSean Bruno.Dq Li cmask 105cc0c1555SSean Brunoqualifier. 106cc0c1555SSean Bruno.El 107cc0c1555SSean Bruno.Ss Event Specifiers (Programmable PMCs) 108cc0c1555SSean BrunoHaswell programmable PMCs support the following events: 109cc0c1555SSean Bruno.Bl -tag -width indent 110cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.MISS 111cc0c1555SSean Bruno.Pq Event 22H , Umask 01H 112cc0c1555SSean BrunoA snoop misses in some processor core. 113cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.INVAL 114cc0c1555SSean Bruno.Pq Event 22H , Umask 02H 115cc0c1555SSean BrunoA snoop invalidates a non-modified line in some 116cc0c1555SSean Brunoprocessor core. 117cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.HIT 118cc0c1555SSean Bruno.Pq Event 22H , Umask 04H 119cc0c1555SSean BrunoA snoop hits a non-modified line in some processor 120cc0c1555SSean Brunocore. 121cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.HITM 122cc0c1555SSean Bruno.Pq Event 22H , Umask 08H 123cc0c1555SSean BrunoA snoop hits a modified line in some processor core. 124cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.INVAL_M 125cc0c1555SSean Bruno.Pq Event 22H , Umask 10H 126cc0c1555SSean BrunoA snoop invalidates a modified line in some processor 127cc0c1555SSean Brunocore. 128cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.EXTERNAL_FILTER 129cc0c1555SSean Bruno.Pq Event 22H , Umask 20H 130cc0c1555SSean BrunoFilter on cross-core snoops initiated by this Cbox due 131cc0c1555SSean Brunoto external snoop request. 132cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.XCORE_FILTER 133cc0c1555SSean Bruno.Pq Event 22H , Umask 40H 134cc0c1555SSean BrunoFilter on cross-core snoops initiated by this Cbox due 135cc0c1555SSean Brunoto processor core memory request. 136cc0c1555SSean Bruno.It Li UNC_CBO_XSNP_RESPONSE.EVICTION_FILTER 137cc0c1555SSean Bruno.Pq Event 22H , Umask 80H 138cc0c1555SSean BrunoFilter on cross-core snoops initiated by this Cbox due 139cc0c1555SSean Brunoto LLC eviction. 140cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.M 141cc0c1555SSean Bruno.Pq Event 34H , Umask 01H 142cc0c1555SSean BrunoLLC lookup request that access cache and found line in 143cc0c1555SSean BrunoM-state. 144cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.ES 145cc0c1555SSean Bruno.Pq Event 34H , Umask 06H 146cc0c1555SSean BrunoLLC lookup request that access cache and found line in 147cc0c1555SSean BrunoE or S state. 148cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.I 149cc0c1555SSean Bruno.Pq Event 34H , Umask 08H 150cc0c1555SSean BrunoLLC lookup request that access cache and found line in 151cc0c1555SSean BrunoI-state. 152cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.READ_FILTER 153cc0c1555SSean Bruno.Pq Event 34H , Umask 10H 154cc0c1555SSean BrunoFilter on processor core initiated cacheable read 1550b129325SGordon Berglingrequests. 1560b129325SGordon BerglingMust combine with at least one of 01H, 02H, 04H, 08H. 157cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.WRITE_FILTER 158cc0c1555SSean Bruno.Pq Event 34H , Umask 20H 1590b129325SGordon BerglingFilter on processor core initiated cacheable write requests. 1600b129325SGordon BerglingMust combine with at least one of 01H, 02H, 04H, 08H. 161cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.EXTSNP_FILTER 162cc0c1555SSean Bruno.Pq Event 34H , Umask 40H 1630b129325SGordon BerglingFilter on external snoop requests. 1640b129325SGordon BerglingMust combine with at least one of 01H, 02H, 04H, 08H. 165cc0c1555SSean Bruno.It Li UNC_CBO_CACHE_LOOKUP.ANY_REQUEST_FILTER 166cc0c1555SSean Bruno.Pq Event 34H , Umask 80H 167cc0c1555SSean BrunoFilter on any IRQ or IPQ initiated requests including 1680b129325SGordon Berglinguncacheable, non-coherent requests. 1690b129325SGordon BerglingMust combine with at least one of 01H, 02H, 04H, 08H. 170cc0c1555SSean Bruno.It Li UNC_ARB_TRK_OCCUPANCY.ALL 171cc0c1555SSean Bruno.Pq Event 80H , Umask 01H 172cc0c1555SSean BrunoCounts cycles weighted by the number of requests 173cc0c1555SSean Brunowaiting for data returning from the memory controller. 174cc0c1555SSean BrunoAccounts for coherent and non-coherent requests 175cc0c1555SSean Brunoinitiated by IA cores, processor graphic units, or LLC. 176cc0c1555SSean Bruno.It Li UNC_ARB_TRK_REQUEST.ALL 177cc0c1555SSean Bruno.Pq Event 81H , Umask 01H 178cc0c1555SSean BrunoCounts the number of coherent and in-coherent 179cc0c1555SSean Brunorequests initiated by IA cores, processor graphic units, 180cc0c1555SSean Brunoor LLC. 181cc0c1555SSean Bruno.It Li UNC_ARB_TRK_REQUEST.WRITES 182cc0c1555SSean Bruno.Pq Event 81H , Umask 20H 183cc0c1555SSean BrunoCounts the number of allocated write entries, include 184cc0c1555SSean Brunofull, partial, and LLC evictions. 185cc0c1555SSean Bruno.It Li UNC_ARB_TRK_REQUEST.EVICTIONS 186cc0c1555SSean Bruno.Pq Event 81H , Umask 80H 187cc0c1555SSean BrunoCounts the number of LLC evictions allocated. 188cc0c1555SSean Bruno.It Li UNC_ARB_COH , Umask TRK_OCCUPANCY.ALL 189cc0c1555SSean Bruno.Pq Event 83H , Umask 01H 190cc0c1555SSean BrunoCycles weighted by number of requests pending in 191cc0c1555SSean BrunoCoherency Tracker. 192cc0c1555SSean Bruno.It Li UNC_ARB_COH , Umask TRK_REQUEST.ALL 193cc0c1555SSean Bruno.Pq Event 84H , Umask 01H 194cc0c1555SSean BrunoNumber of requests allocated in Coherency Tracker. 195cc0c1555SSean Bruno.El 196cc0c1555SSean Bruno.Sh SEE ALSO 197cc0c1555SSean Bruno.Xr pmc 3 , 198*b2934971SMitchell Horne.Xr pmc.amd 3 , 199cc0c1555SSean Bruno.Xr pmc.atom 3 , 200cc0c1555SSean Bruno.Xr pmc.core 3 , 201cc0c1555SSean Bruno.Xr pmc.corei7 3 , 202cc0c1555SSean Bruno.Xr pmc.corei7uc 3 , 203cc0c1555SSean Bruno.Xr pmc.haswell 3 , 204cc0c1555SSean Bruno.Xr pmc.iaf 3 , 205cc0c1555SSean Bruno.Xr pmc.sandybridge 3 , 206cc0c1555SSean Bruno.Xr pmc.sandybridgeuc 3 , 207cc0c1555SSean Bruno.Xr pmc.sandybridgexeon 3 , 208cc0c1555SSean Bruno.Xr pmc.soft 3 , 209cc0c1555SSean Bruno.Xr pmc.tsc 3 , 210cc0c1555SSean Bruno.Xr pmc.ucf 3 , 211cc0c1555SSean Bruno.Xr pmc.westmere 3 , 212cc0c1555SSean Bruno.Xr pmc.westmereuc 3 , 213cc0c1555SSean Bruno.Xr pmc_cpuinfo 3 , 214cc0c1555SSean Bruno.Xr pmclog 3 , 215cc0c1555SSean Bruno.Xr hwpmc 4 216cc0c1555SSean Bruno.Sh HISTORY 217cc0c1555SSean BrunoThe 218cc0c1555SSean Bruno.Nm pmc 219cc0c1555SSean Brunolibrary first appeared in 220cc0c1555SSean Bruno.Fx 6.0 . 221cc0c1555SSean Bruno.Sh AUTHORS 2222b7af31cSBaptiste Daroussin.An -nosplit 223cc0c1555SSean BrunoThe 224cc0c1555SSean Bruno.Lb libpmc 225cc0c1555SSean Brunolibrary was written by 2262b7af31cSBaptiste Daroussin.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org . 227cc0c1555SSean BrunoThe support for the Haswell 228cc0c1555SSean Brunomicroarchitecture was added by 2292b7af31cSBaptiste Daroussin.An Hiren Panchasara Aq Mt hiren.panchasara@gmail.com . 230