17042d3b9SJoseph Koshy.\" Copyright (c) 2008 Joseph Koshy. All rights reserved. 27042d3b9SJoseph Koshy.\" 37042d3b9SJoseph Koshy.\" Redistribution and use in source and binary forms, with or without 47042d3b9SJoseph Koshy.\" modification, are permitted provided that the following conditions 57042d3b9SJoseph Koshy.\" are met: 67042d3b9SJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright 77042d3b9SJoseph Koshy.\" notice, this list of conditions and the following disclaimer. 87042d3b9SJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright 97042d3b9SJoseph Koshy.\" notice, this list of conditions and the following disclaimer in the 107042d3b9SJoseph Koshy.\" documentation and/or other materials provided with the distribution. 117042d3b9SJoseph Koshy.\" 127042d3b9SJoseph Koshy.\" This software is provided by Joseph Koshy ``as is'' and 137042d3b9SJoseph Koshy.\" any express or implied warranties, including, but not limited to, the 147042d3b9SJoseph Koshy.\" implied warranties of merchantability and fitness for a particular purpose 157042d3b9SJoseph Koshy.\" are disclaimed. in no event shall Joseph Koshy be liable 167042d3b9SJoseph Koshy.\" for any direct, indirect, incidental, special, exemplary, or consequential 177042d3b9SJoseph Koshy.\" damages (including, but not limited to, procurement of substitute goods 187042d3b9SJoseph Koshy.\" or services; loss of use, data, or profits; or business interruption) 197042d3b9SJoseph Koshy.\" however caused and on any theory of liability, whether in contract, strict 207042d3b9SJoseph Koshy.\" liability, or tort (including negligence or otherwise) arising in any way 217042d3b9SJoseph Koshy.\" out of the use of this software, even if advised of the possibility of 227042d3b9SJoseph Koshy.\" such damage. 237042d3b9SJoseph Koshy.\" 247042d3b9SJoseph Koshy.\" $FreeBSD$ 257042d3b9SJoseph Koshy.\" 26944e20faSJoseph Koshy.Dd November 14, 2008 277042d3b9SJoseph Koshy.Dt PMC.IAF 3 28*aa12cea2SUlrich Spörlein.Os 297042d3b9SJoseph Koshy.Sh NAME 307042d3b9SJoseph Koshy.Nm pmc.iaf 317042d3b9SJoseph Koshy.Nd measurement events for 327042d3b9SJoseph Koshy.Tn Intel 337042d3b9SJoseph Koshyfixed function performance counters. 347042d3b9SJoseph Koshy.Sh LIBRARY 357042d3b9SJoseph Koshy.Lb libpmc 367042d3b9SJoseph Koshy.Sh SYNOPSIS 377042d3b9SJoseph Koshy.In pmc.h 387042d3b9SJoseph Koshy.Sh DESCRIPTION 397042d3b9SJoseph Koshy.Tn Intel 407042d3b9SJoseph Koshyfixed-function PMCs are present in CPUs that conform to version 2 or 417042d3b9SJoseph Koshylater of the 427042d3b9SJoseph Koshy.Tn Intel 437042d3b9SJoseph KoshyPerformance Measurement Architecture. 447042d3b9SJoseph KoshyEach fixed-function PMC measures a specific hardware event. 457042d3b9SJoseph KoshyThe number of fixed-function PMCs implemented in a CPU can vary. 467042d3b9SJoseph KoshyThe number of fixed-function PMCs present can be determined at runtime 477042d3b9SJoseph Koshyby using function 487042d3b9SJoseph Koshy.Xr pmc_cpuinfo 3 . 497042d3b9SJoseph Koshy.Pp 507042d3b9SJoseph KoshyIntel fixed-function PMCs are documented in 517042d3b9SJoseph Koshy.Rs 527042d3b9SJoseph Koshy.%B "IA-32 Intel(R) Architecture Software Developer's Manual" 537042d3b9SJoseph Koshy.%T "Volume 3: System Programming Guide" 547042d3b9SJoseph Koshy.%N "Order Number 253669-027US" 557042d3b9SJoseph Koshy.%D July 2008 567042d3b9SJoseph Koshy.%Q "Intel Corporation" 577042d3b9SJoseph Koshy.Re 587042d3b9SJoseph Koshy.Pp 597042d3b9SJoseph Koshy.Ss PMC Capabilities 607042d3b9SJoseph KoshyFixed-function PMCs support the following capabilities: 617042d3b9SJoseph Koshy.Bl -column "PMC_CAP_INTERRUPT" "Support" 627042d3b9SJoseph Koshy.It Em Capability Ta Em Support 637042d3b9SJoseph Koshy.It PMC_CAP_CASCADE Ta \&No 647042d3b9SJoseph Koshy.It PMC_CAP_EDGE Ta \&No 657042d3b9SJoseph Koshy.It PMC_CAP_INTERRUPT Ta Yes 667042d3b9SJoseph Koshy.It PMC_CAP_INVERT Ta \&No 677042d3b9SJoseph Koshy.It PMC_CAP_READ Ta Yes 687042d3b9SJoseph Koshy.It PMC_CAP_PRECISE Ta \&No 697042d3b9SJoseph Koshy.It PMC_CAP_SYSTEM Ta Yes 707042d3b9SJoseph Koshy.It PMC_CAP_TAGGING Ta \&No 717042d3b9SJoseph Koshy.It PMC_CAP_THRESHOLD Ta \&No 727042d3b9SJoseph Koshy.It PMC_CAP_USER Ta Yes 737042d3b9SJoseph Koshy.It PMC_CAP_WRITE Ta Yes 747042d3b9SJoseph Koshy.El 75944e20faSJoseph Koshy.Ss Class Name Prefix 76ef582158SJoseph KoshyThese PMCs are named using a class name prefix of 77944e20faSJoseph Koshy.Dq Li iaf- . 787042d3b9SJoseph Koshy.Ss Event Qualifiers (Fixed Function PMCs) 797042d3b9SJoseph KoshyThese PMCs support the following modifiers: 807042d3b9SJoseph Koshy.Bl -tag -width indent 817042d3b9SJoseph Koshy.It Li os 827042d3b9SJoseph KoshyConfigure the PMC to count events occurring at ring level 0. 837042d3b9SJoseph Koshy.It Li usr 847042d3b9SJoseph KoshyConfigure the PMC to count events occurring at ring levels 1, 2 857042d3b9SJoseph Koshyor 3. 86944e20faSJoseph Koshy.It Li anythread 87944e20faSJoseph Koshy.Pq Tn Atom CPUs 88944e20faSJoseph KoshyConfigure the PMC to count events on all logical processors sharing a 89944e20faSJoseph Koshyprocessor core. 90944e20faSJoseph KoshyThe default is to count events on the current logical processor. 917042d3b9SJoseph Koshy.El 927042d3b9SJoseph Koshy.Pp 937042d3b9SJoseph KoshyIf neither of the 947042d3b9SJoseph Koshy.Dq Li os 957042d3b9SJoseph Koshyor 967042d3b9SJoseph Koshy.Dq Li usr 977042d3b9SJoseph Koshyqualifiers are specified, the default is to enable both. 987042d3b9SJoseph Koshy.Ss Event Specifiers (Fixed Function PMCs) 997042d3b9SJoseph KoshyThe fixed function PMCs are selectable using the following 1007042d3b9SJoseph Koshyevent names: 1017042d3b9SJoseph Koshy.Bl -tag -width indent 10206209c44SJoseph Koshy.It Li INSTR_RETIRED.ANY 1037042d3b9SJoseph Koshy.Pq Fixed Function Counter 0 1047042d3b9SJoseph KoshyThe number of instructions retired. 10506209c44SJoseph Koshy.It Li CPU_CLK_UNHALTED.CORE 1067042d3b9SJoseph Koshy.Pq Fixed Function Counter 1 1077042d3b9SJoseph KoshyThe number of core cycles for which the core is not halted. 10806209c44SJoseph Koshy.It Li CPU_CLK_UNHALTED.REF 1097042d3b9SJoseph Koshy.Pq Fixed Function Counter 2 1107042d3b9SJoseph KoshyThe number of reference cycles for which the core is not halted. 1117042d3b9SJoseph Koshy.El 112944e20faSJoseph Koshy.Sh EXAMPLES 113944e20faSJoseph KoshyTo measure the number of core cycles for which the core was not halted 114944e20faSJoseph Koshyuse the event specifier 115944e20faSJoseph Koshy.Qq iaf-cpu-clk-unhalted.core . 116944e20faSJoseph Koshy.Pp 117944e20faSJoseph KoshyTo measure the number of user instructions retired use the event specifier 118944e20faSJoseph Koshy.Qq iaf-instr-retired.any,usr . 119944e20faSJoseph Koshy.Pp 120944e20faSJoseph KoshyTo measure the number of user instructions retired on all logical processors 121944e20faSJoseph Koshyin an 122944e20faSJoseph Koshy.Tn Atom 123944e20faSJoseph KoshyCPU, use the event specifier 124944e20faSJoseph Koshy.Qq iaf-instr-retired.any,usr,anythread . 1257042d3b9SJoseph Koshy.Sh SEE ALSO 1267042d3b9SJoseph Koshy.Xr pmc 3 , 1277042d3b9SJoseph Koshy.Xr pmc.atom 3 , 1287042d3b9SJoseph Koshy.Xr pmc.core 3 , 1297042d3b9SJoseph Koshy.Xr pmc.core2 3 , 1307042d3b9SJoseph Koshy.Xr pmc.k7 3 , 1317042d3b9SJoseph Koshy.Xr pmc.k8 3 , 1327042d3b9SJoseph Koshy.Xr pmc.p4 3 , 1337042d3b9SJoseph Koshy.Xr pmc.p5 3 , 1347042d3b9SJoseph Koshy.Xr pmc.p6 3 , 1357042d3b9SJoseph Koshy.Xr pmc.tsc 3 , 1367042d3b9SJoseph Koshy.Xr pmc_cpuinfo 3 , 1377042d3b9SJoseph Koshy.Xr pmclog 3 , 1387042d3b9SJoseph Koshy.Xr hwpmc 4 1397042d3b9SJoseph Koshy.Sh HISTORY 1407042d3b9SJoseph KoshyThe 1417042d3b9SJoseph Koshy.Nm pmc 1427042d3b9SJoseph Koshylibrary first appeared in 1437042d3b9SJoseph Koshy.Fx 6.0 . 1447042d3b9SJoseph Koshy.Sh AUTHORS 1457042d3b9SJoseph KoshyThe 1467042d3b9SJoseph Koshy.Lb libpmc 1477042d3b9SJoseph Koshylibrary was written by 1487042d3b9SJoseph Koshy.An "Joseph Koshy" 1497042d3b9SJoseph Koshy.Aq jkoshy@FreeBSD.org . 150