xref: /freebsd/lib/libpmc/pmc.3 (revision 177a2f22458a07d5a03309be8b9aebc4d3a5b2f8)
1f263522aSJoseph Koshy.\" Copyright (c) 2003-2005 Joseph Koshy.  All rights reserved.
2ebccf1e3SJoseph Koshy.\"
3ebccf1e3SJoseph Koshy.\" Redistribution and use in source and binary forms, with or without
4ebccf1e3SJoseph Koshy.\" modification, are permitted provided that the following conditions
5ebccf1e3SJoseph Koshy.\" are met:
6ebccf1e3SJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright
7ebccf1e3SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer.
8ebccf1e3SJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright
9ebccf1e3SJoseph Koshy.\"    notice, this list of conditions and the following disclaimer in the
10ebccf1e3SJoseph Koshy.\"    documentation and/or other materials provided with the distribution.
11ebccf1e3SJoseph Koshy.\"
12ebccf1e3SJoseph Koshy.\" This software is provided by Joseph Koshy ``as is'' and
13ebccf1e3SJoseph Koshy.\" any express or implied warranties, including, but not limited to, the
14ebccf1e3SJoseph Koshy.\" implied warranties of merchantability and fitness for a particular purpose
15ebccf1e3SJoseph Koshy.\" are disclaimed.  in no event shall Joseph Koshy be liable
16ebccf1e3SJoseph Koshy.\" for any direct, indirect, incidental, special, exemplary, or consequential
17ebccf1e3SJoseph Koshy.\" damages (including, but not limited to, procurement of substitute goods
18ebccf1e3SJoseph Koshy.\" or services; loss of use, data, or profits; or business interruption)
19ebccf1e3SJoseph Koshy.\" however caused and on any theory of liability, whether in contract, strict
20ebccf1e3SJoseph Koshy.\" liability, or tort (including negligence or otherwise) arising in any way
21ebccf1e3SJoseph Koshy.\" out of the use of this software, even if advised of the possibility of
22ebccf1e3SJoseph Koshy.\" such damage.
23ebccf1e3SJoseph Koshy.\"
24ebccf1e3SJoseph Koshy.\" $FreeBSD$
25ebccf1e3SJoseph Koshy.\"
269abe909bSRuslan Ermilov.Dd June 24, 2005
27ebccf1e3SJoseph Koshy.Os
28ebccf1e3SJoseph Koshy.Dt PMC 3
29ebccf1e3SJoseph Koshy.Sh NAME
30ebccf1e3SJoseph Koshy.Nm pmc_allocate ,
31ebccf1e3SJoseph Koshy.Nm pmc_attach ,
32c5153e19SJoseph Koshy.Nm pmc_capabilities ,
33ebccf1e3SJoseph Koshy.Nm pmc_configure_logfile ,
34ebccf1e3SJoseph Koshy.Nm pmc_cpuinfo ,
35ebccf1e3SJoseph Koshy.Nm pmc_detach ,
36ebccf1e3SJoseph Koshy.Nm pmc_disable ,
37ebccf1e3SJoseph Koshy.Nm pmc_enable ,
38ebccf1e3SJoseph Koshy.Nm pmc_event_names_of_class ,
39f263522aSJoseph Koshy.Nm pmc_flush_logfile ,
40ebccf1e3SJoseph Koshy.Nm pmc_get_driver_stats ,
41f263522aSJoseph Koshy.Nm pmc_get_msr ,
42ebccf1e3SJoseph Koshy.Nm pmc_init ,
43ebccf1e3SJoseph Koshy.Nm pmc_name_of_capability ,
44ebccf1e3SJoseph Koshy.Nm pmc_name_of_class ,
45ebccf1e3SJoseph Koshy.Nm pmc_name_of_cputype ,
46ebccf1e3SJoseph Koshy.Nm pmc_name_of_event ,
47ebccf1e3SJoseph Koshy.Nm pmc_name_of_mode ,
48ebccf1e3SJoseph Koshy.Nm pmc_name_of_state ,
49ebccf1e3SJoseph Koshy.Nm pmc_ncpu ,
50ebccf1e3SJoseph Koshy.Nm pmc_npmc ,
51ebccf1e3SJoseph Koshy.Nm pmc_pmcinfo ,
52ebccf1e3SJoseph Koshy.Nm pmc_read ,
53ebccf1e3SJoseph Koshy.Nm pmc_release ,
54ebccf1e3SJoseph Koshy.Nm pmc_rw ,
55ebccf1e3SJoseph Koshy.Nm pmc_set ,
56ebccf1e3SJoseph Koshy.Nm pmc_start ,
57ebccf1e3SJoseph Koshy.Nm pmc_stop ,
58c5153e19SJoseph Koshy.Nm pmc_width ,
59f263522aSJoseph Koshy.Nm pmc_write ,
60f263522aSJoseph Koshy.Nm pmc_writelog
61ebccf1e3SJoseph Koshy.Nd programming API for using hardware performance monitoring counters
62ebccf1e3SJoseph Koshy.Sh LIBRARY
63ebccf1e3SJoseph Koshy.Lb libpmc
64ebccf1e3SJoseph Koshy.Sh SYNOPSIS
65ebccf1e3SJoseph Koshy.In pmc.h
66ebccf1e3SJoseph Koshy.Ft int
67ebccf1e3SJoseph Koshy.Fo pmc_allocate
68ebccf1e3SJoseph Koshy.Fa "const char *eventspecifier"
69ebccf1e3SJoseph Koshy.Fa "enum pmc_mode mode"
70ebccf1e3SJoseph Koshy.Fa "uint32_t flags"
713a145486SRuslan Ermilov.Fa "int cpu"
72ebccf1e3SJoseph Koshy.Fa "pmc_id_t *pmcid"
73ebccf1e3SJoseph Koshy.Fc
74ebccf1e3SJoseph Koshy.Ft int
759abe909bSRuslan Ermilov.Fn pmc_attach "pmc_id_t pmcid" "pid_t pid"
76ebccf1e3SJoseph Koshy.Ft int
77c5153e19SJoseph Koshy.Fn pmc_capabilities "pmc_id_t pmc" "uint32_t *caps"
78c5153e19SJoseph Koshy.Ft int
79ebccf1e3SJoseph Koshy.Fn pmc_configure_logfile "int fd"
80ebccf1e3SJoseph Koshy.Ft int
81f263522aSJoseph Koshy.Fn pmc_cpuinfo "const struct pmc_cpuinfo **cpu_info"
82ebccf1e3SJoseph Koshy.Ft int
839abe909bSRuslan Ermilov.Fn pmc_detach "pmc_id_t pmcid" "pid_t pid"
84ebccf1e3SJoseph Koshy.Ft int
853a145486SRuslan Ermilov.Fn pmc_disable "int cpu" "int pmc"
86ebccf1e3SJoseph Koshy.Ft int
873a145486SRuslan Ermilov.Fn pmc_enable "int cpu" "int pmc"
88ebccf1e3SJoseph Koshy.Ft int
89ebccf1e3SJoseph Koshy.Fo pmc_event_names_of_class
90ebccf1e3SJoseph Koshy.Fa "enum pmc_class cl"
91ebccf1e3SJoseph Koshy.Fa "const char ***eventnames"
92ebccf1e3SJoseph Koshy.Fa "int *nevents"
93ebccf1e3SJoseph Koshy.Fc
94ebccf1e3SJoseph Koshy.Ft int
959abe909bSRuslan Ermilov.Fn pmc_flush_logfile void
96f263522aSJoseph Koshy.Ft int
97f263522aSJoseph Koshy.Fn pmc_get_driver_stats "struct pmc_driverstats *gms"
98f263522aSJoseph Koshy.Ft int
99f263522aSJoseph Koshy.Fn pmc_get_msr "pmc_id_t pmc" "uint32_t *msr"
100ebccf1e3SJoseph Koshy.Ft int
1019abe909bSRuslan Ermilov.Fn pmc_init void
102ebccf1e3SJoseph Koshy.Ft "const char *"
103ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability "enum pmc_caps pc"
104ebccf1e3SJoseph Koshy.Ft "const char *"
105ebccf1e3SJoseph Koshy.Fn pmc_name_of_class "enum pmc_class pc"
106ebccf1e3SJoseph Koshy.Ft "const char *"
107ebccf1e3SJoseph Koshy.Fn pmc_name_of_cputype "enum pmc_cputype ct"
108ebccf1e3SJoseph Koshy.Ft "const char *"
109ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition "enum pmc_disp pd"
110ebccf1e3SJoseph Koshy.Ft "const char *"
111ebccf1e3SJoseph Koshy.Fn pmc_name_of_event "enum pmc_event pe"
112ebccf1e3SJoseph Koshy.Ft "const char *"
113ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode "enum pmc_mode pm"
114ebccf1e3SJoseph Koshy.Ft "const char *"
115ebccf1e3SJoseph Koshy.Fn pmc_name_of_state "enum pmc_state ps"
116ebccf1e3SJoseph Koshy.Ft int
1179abe909bSRuslan Ermilov.Fn pmc_ncpu void
118ebccf1e3SJoseph Koshy.Ft int
1193a145486SRuslan Ermilov.Fn pmc_npmc "int cpu"
120ebccf1e3SJoseph Koshy.Ft int
1213a145486SRuslan Ermilov.Fn pmc_pmcinfo "int cpu" "struct pmc_pmcinfo **pmc_info"
122ebccf1e3SJoseph Koshy.Ft int
123ebccf1e3SJoseph Koshy.Fn pmc_read "pmc_id_t pmc" "pmc_value_t *value"
124ebccf1e3SJoseph Koshy.Ft int
125ebccf1e3SJoseph Koshy.Fn pmc_release "pmc_id_t pmc"
126ebccf1e3SJoseph Koshy.Ft int
127ebccf1e3SJoseph Koshy.Fn pmc_rw "pmc_id_t pmc" "pmc_value_t newvalue" "pmc_value_t *oldvaluep"
128ebccf1e3SJoseph Koshy.Ft int
129ebccf1e3SJoseph Koshy.Fn pmc_set "pmc_id_t pmc" "pmc_value_t value"
130ebccf1e3SJoseph Koshy.Ft int
131ebccf1e3SJoseph Koshy.Fn pmc_start "pmc_id_t pmc"
132ebccf1e3SJoseph Koshy.Ft int
133ebccf1e3SJoseph Koshy.Fn pmc_stop "pmc_id_t pmc"
134ebccf1e3SJoseph Koshy.Ft int
135ebccf1e3SJoseph Koshy.Fn pmc_write "pmc_id_t pmc" "pmc_value_t value"
136ebccf1e3SJoseph Koshy.Ft int
137f263522aSJoseph Koshy.Fn pmc_writelog "uint32_t userdata"
138c5153e19SJoseph Koshy.Ft int
139f263522aSJoseph Koshy.Fn pmc_width "pmc_id_t pmc" "uint32_t *width"
140ebccf1e3SJoseph Koshy.Sh DESCRIPTION
141ebccf1e3SJoseph KoshyThese functions implement a high-level library for using the
142ebccf1e3SJoseph Koshysystem's hardware performance counters.
143ebccf1e3SJoseph Koshy.Pp
144ebccf1e3SJoseph KoshyPMCs are allocated using
145ebccf1e3SJoseph Koshy.Fn pmc_allocate ,
146ebccf1e3SJoseph Koshyreleased using
147ebccf1e3SJoseph Koshy.Fn pmc_release
148ebccf1e3SJoseph Koshyand read using
149ebccf1e3SJoseph Koshy.Fn pmc_read .
150ebccf1e3SJoseph KoshyAllocated PMCs may be started or stopped at any time using
151ebccf1e3SJoseph Koshy.Fn pmc_start
152ebccf1e3SJoseph Koshyand
153ebccf1e3SJoseph Koshy.Fn pmc_stop
154ebccf1e3SJoseph Koshyrespectively.
155ebccf1e3SJoseph KoshyAn allocated PMC may be of
1569abe909bSRuslan Ermilov.Dq global
157ebccf1e3SJoseph Koshyscope, meaning that the PMC measures system-wide events, or
1589abe909bSRuslan Ermilov.Dq process-private
159ebccf1e3SJoseph Koshyscope, meaning that the PMC only counts hardware events when
160ebccf1e3SJoseph Koshythe allocating process (or, optionally, its children)
161ebccf1e3SJoseph Koshyare active.
162ebccf1e3SJoseph Koshy.Pp
163ebccf1e3SJoseph KoshyPMCs may further be in
1649abe909bSRuslan Ermilov.Dq "counting mode" ,
165ebccf1e3SJoseph Koshyor in
1669abe909bSRuslan Ermilov.Dq "sampling mode" .
167ebccf1e3SJoseph KoshySampling mode PMCs deliver an interrupt to the CPU after
168ebccf1e3SJoseph Koshya configured number of hardware events have been seen.
169ebccf1e3SJoseph KoshyA process-private sampling mode PMC will cause its owner
170ebccf1e3SJoseph Koshyprocess to get periodic
1719abe909bSRuslan Ermilov.Dv SIGPROF
172ebccf1e3SJoseph Koshyinterrupts, while a global sampling mode PMC is used to
173ebccf1e3SJoseph Koshydo system-wide statistical sampling (see
174ebccf1e3SJoseph Koshy.Xr hwpmc 4 ) .
175ebccf1e3SJoseph KoshyThe sampling rate desired of a sampling-mode PMC is set using
176ebccf1e3SJoseph Koshy.Fn pmc_set .
177ebccf1e3SJoseph KoshyCounting mode PMCs do not interrupt the CPU; their values
178ebccf1e3SJoseph Koshycan be read using
179ebccf1e3SJoseph Koshy.Fn pmc_read .
180ebccf1e3SJoseph Koshy.Pp
181ebccf1e3SJoseph KoshySystem-wide statistical sampling is configured by allocating
182ebccf1e3SJoseph Koshyat least one sampling mode PMC with
183ebccf1e3SJoseph Koshyglobal scope, and when a log file is configured using
184ebccf1e3SJoseph Koshy.Fn pmc_configure_logfile .
185ebccf1e3SJoseph KoshyThe
186ebccf1e3SJoseph Koshy.Xr hwpmc 4
187ebccf1e3SJoseph Koshydriver manages system-wide statistical sampling; for more
188ebccf1e3SJoseph Koshyinformation please see
189ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
1909abe909bSRuslan Ermilov.Ss Application Programming Interface
1919abe909bSRuslan ErmilovThe function
192ebccf1e3SJoseph Koshy.Fn pmc_init
193ebccf1e3SJoseph Koshyinitializes the
194110e1704SRuslan Ermilov.Nm pmc
195ebccf1e3SJoseph Koshylibrary.
196ebccf1e3SJoseph KoshyThis function must be called first, before any of the other
197ebccf1e3SJoseph Koshyfunctions in the library.
198ebccf1e3SJoseph Koshy.Pp
1999abe909bSRuslan ErmilovThe function
200ebccf1e3SJoseph Koshy.Fn pmc_allocate
201ebccf1e3SJoseph Koshyallocates a counter that counts the events named by
202ebccf1e3SJoseph Koshy.Fa eventspecifier ,
2039abe909bSRuslan Ermilovand writes the allocated counter ID to
204ebccf1e3SJoseph Koshy.Fa *pmcid .
205ebccf1e3SJoseph KoshyArgument
206ebccf1e3SJoseph Koshy.Fa eventspecifier
207ebccf1e3SJoseph Koshycomprises an PMC event name followed by an optional comma separated
208ebccf1e3SJoseph Koshylist of keywords and qualifiers.
209ebccf1e3SJoseph KoshyThe allowed syntax for
210ebccf1e3SJoseph Koshy.Fa eventspecifier
211ebccf1e3SJoseph Koshyis processor architecture specific and is listed in section
212ebccf1e3SJoseph Koshy.Sx "EVENT SPECIFIERS"
213ebccf1e3SJoseph Koshybelow.
214ebccf1e3SJoseph KoshyThe desired PMC mode is specified by
215ebccf1e3SJoseph Koshy.Fa mode ,
216ebccf1e3SJoseph Koshyand any mode specific modifiers are specified using
217ebccf1e3SJoseph Koshy.Fa flags .
218ebccf1e3SJoseph KoshyThe
219ebccf1e3SJoseph Koshy.Fa cpu
220ebccf1e3SJoseph Koshyargument is the value
2219abe909bSRuslan Ermilov.Dv PMC_CPU_ANY ,
2229abe909bSRuslan Ermilovor names the CPU the allocation is to be on.
2239abe909bSRuslan ErmilovRequesting a specific CPU only makes sense for global PMCs;
224ebccf1e3SJoseph Koshyprocess-private PMC allocations should always specify
2259abe909bSRuslan Ermilov.Dv PMC_CPU_ANY .
226ebccf1e3SJoseph Koshy.Pp
2279abe909bSRuslan ErmilovBy default, a PMC configured in process-virtual counting mode is set up
228ebccf1e3SJoseph Koshyto profile its owner process.
229ebccf1e3SJoseph KoshyThe function
230ebccf1e3SJoseph Koshy.Fn pmc_attach
231ebccf1e3SJoseph Koshymay be used to attach the PMC to a different process.
2329abe909bSRuslan ErmilovIt
233ebccf1e3SJoseph Koshyneeds to be called before the counter is first started
234ebccf1e3SJoseph Koshywith
235ebccf1e3SJoseph Koshy.Fn pmc_start .
236ebccf1e3SJoseph KoshyThe function
237ebccf1e3SJoseph Koshy.Fn pmc_detach
238ebccf1e3SJoseph Koshymay be used to detach a PMC from a process it was attached to
239ebccf1e3SJoseph Koshyusing a prior call to
240ebccf1e3SJoseph Koshy.Fn pmc_attach .
241ebccf1e3SJoseph Koshy.Pp
2429abe909bSRuslan ErmilovThe function
243ebccf1e3SJoseph Koshy.Fn pmc_release
244ebccf1e3SJoseph Koshyreleases a PMC previously allocated with
245ebccf1e3SJoseph Koshy.Fn pmc_allocate .
246ebccf1e3SJoseph KoshyThis function call implicitly detaches the PMC from all its target
247ebccf1e3SJoseph Koshyprocesses.
248ebccf1e3SJoseph Koshy.Pp
249ebccf1e3SJoseph KoshyAn allocated PMC may be started and stopped using
250ebccf1e3SJoseph Koshy.Fn pmc_start
251ebccf1e3SJoseph Koshyand
252ebccf1e3SJoseph Koshy.Fn pmc_stop
253ebccf1e3SJoseph Koshyrespectively.
254ebccf1e3SJoseph Koshy.Pp
255ebccf1e3SJoseph KoshyThe current value of a PMC may be read with
256ebccf1e3SJoseph Koshy.Fn pmc_read
257ebccf1e3SJoseph Koshyand written using
258ebccf1e3SJoseph Koshy.Fn pmc_write ,
259ebccf1e3SJoseph Koshyprovided the underlying hardware supports these operations on
260ebccf1e3SJoseph Koshythe allocated PMC.
261ebccf1e3SJoseph KoshyThe read and write operation may be combined using
262ebccf1e3SJoseph Koshy.Fn pmc_rw .
263ebccf1e3SJoseph Koshy.Pp
264c5153e19SJoseph KoshyThe function
265c5153e19SJoseph Koshy.Fn pmc_capabilities
266c5153e19SJoseph Koshysets argument
267c5153e19SJoseph Koshy.Fa caps
268c5153e19SJoseph Koshyto a bitmask of capabilities supported by the PMC denoted by
269c5153e19SJoseph Koshyargument
270c5153e19SJoseph Koshy.Fa pmc .
271c5153e19SJoseph KoshyThe function
272c5153e19SJoseph Koshy.Fn pmc_width
273c5153e19SJoseph Koshysets argument
274c5153e19SJoseph Koshy.Fa width
275c5153e19SJoseph Koshyto the width of the PMC denoted by argument
276c5153e19SJoseph Koshy.Fa pmc .
277c5153e19SJoseph Koshy.Pp
278ebccf1e3SJoseph KoshyThe
279ebccf1e3SJoseph Koshy.Fn pmc_configure_logfile
280ebccf1e3SJoseph Koshyfunction causes the
281ebccf1e3SJoseph Koshy.Xr hwpmc 4
282f263522aSJoseph Koshydriver to log performance data to file corresponding
283ebccf1e3SJoseph Koshyto the process' file handle
284ebccf1e3SJoseph Koshy.Fa fd .
285f263522aSJoseph KoshyIf argument
286f263522aSJoseph Koshy.Fa fd
2879abe909bSRuslan Ermilovis \-1, then any previously configured logging is reset
288f263522aSJoseph Koshyand all data queued to be written are discarded.
289f263522aSJoseph Koshy.Pp
290f263522aSJoseph KoshyThe
291f263522aSJoseph Koshy.Fn pmc_flush_logfile
292f263522aSJoseph Koshyfunction will send all data queued inside the
293f263522aSJoseph Koshy.Xr hwpmc 4
294f263522aSJoseph Koshydriver to the configured log file before returning.
295f263522aSJoseph KoshyThe
296f263522aSJoseph Koshy.Fn pmc_writelog
297f263522aSJoseph Koshyfunction will append a log entry containing the argument
298f263522aSJoseph Koshy.Fa userdata
299f263522aSJoseph Koshyto the log file.
300ebccf1e3SJoseph Koshy.Pp
3019abe909bSRuslan ErmilovThe function
302ebccf1e3SJoseph Koshy.Fn pmc_set
3039abe909bSRuslan Ermilovconfigures a sampling PMC
304ebccf1e3SJoseph Koshy.Fa pmc
305ebccf1e3SJoseph Koshyto interrupt every
306ebccf1e3SJoseph Koshy.Fa value
307ebccf1e3SJoseph Koshyevents.
308ebccf1e3SJoseph KoshyFor counting PMCs,
309ebccf1e3SJoseph Koshy.Fn pmc_set
310ebccf1e3SJoseph Koshysets the initial value of the PMC to
311ebccf1e3SJoseph Koshy.Fa value .
312ebccf1e3SJoseph Koshy.Pp
3139abe909bSRuslan ErmilovThe function
314ebccf1e3SJoseph Koshy.Fn pmc_get_driver_statistics
315ebccf1e3SJoseph Koshycopies a snapshot of the usage statistics maintained by
316ebccf1e3SJoseph Koshy.Xr hwpmc 4
3179abe909bSRuslan Ermilovinto the memory area pointed to by argument
318ebccf1e3SJoseph Koshy.Fa gms .
3199abe909bSRuslan Ermilov.Ss Signal Handling Requirements
320ebccf1e3SJoseph KoshyApplications using PMCs are required to handle the following signals:
321ebccf1e3SJoseph Koshy.Bl -tag -width indent
3229abe909bSRuslan Ermilov.It Dv SIGBUS
323ebccf1e3SJoseph KoshyWhen the
324ebccf1e3SJoseph Koshy.Xr hwpmc 4
325ebccf1e3SJoseph Koshymodule is unloaded using
326ebccf1e3SJoseph Koshy.Xr kldunload 8 ,
327ebccf1e3SJoseph Koshyprocesses that have PMCs allocated to them will be sent a
3289abe909bSRuslan Ermilov.Dv SIGBUS
3299abe909bSRuslan Ermilovsignal.
3309abe909bSRuslan Ermilov.It Dv SIGIO
331f263522aSJoseph KoshyThe
332f263522aSJoseph Koshy.Xr hwpmc 4
3339abe909bSRuslan Ermilovdriver will send a PMC owning process a
3349abe909bSRuslan Ermilov.Dv SIGIO
3359abe909bSRuslan Ermilovsignal if:
336f263522aSJoseph Koshy.Bl -bullet
337f263522aSJoseph Koshy.It
338f263522aSJoseph KoshyIf any process-mode PMC allocated by it loses all its
339f263522aSJoseph Koshytarget processes.
340f263522aSJoseph Koshy.It
341f263522aSJoseph KoshyIf the driver encounters an error when writing log data to a
342f263522aSJoseph Koshyconfigured log file.
343f263522aSJoseph KoshyThis error may be retrieved by a subsequent call to
344f263522aSJoseph Koshy.Fn pmc_flush_logfile .
345f263522aSJoseph Koshy.El
346ebccf1e3SJoseph Koshy.El
3479abe909bSRuslan Ermilov.Ss Convenience Functions
3489abe909bSRuslan ErmilovThe function
349ebccf1e3SJoseph Koshy.Fn pmc_ncpu
350ebccf1e3SJoseph Koshyreturns the number of CPUs present in the system.
351ebccf1e3SJoseph Koshy.Pp
3529abe909bSRuslan ErmilovThe function
353ebccf1e3SJoseph Koshy.Fn pmc_npmc
354ebccf1e3SJoseph Koshyreturns the number of PMCs supported on CPU
355ebccf1e3SJoseph Koshy.Fa cpu .
3569abe909bSRuslan ErmilovThe function
357ebccf1e3SJoseph Koshy.Fn pmc_cpuinfo
358ebccf1e3SJoseph Koshysets argument
359ebccf1e3SJoseph Koshy.Fa cpu_info
360ebccf1e3SJoseph Koshyto point to a structure with information about the system's CPUs.
361f263522aSJoseph KoshyFunction
362ebccf1e3SJoseph Koshy.Fn pmc_pmcinfo
363ebccf1e3SJoseph Koshyreturns information about the current state of CPU
3649abe909bSRuslan Ermilov.Fa cpu Ns 's
365ebccf1e3SJoseph KoshyPMCs.
366f263522aSJoseph KoshyThis function sets argument
367f263522aSJoseph Koshy.Fa *pmc_info
368f263522aSJoseph Koshyto point to a memory area allocated with
369f263522aSJoseph Koshy.Xr calloc 3 .
370f263522aSJoseph KoshyThe caller is expected to
371f263522aSJoseph Koshy.Fn free
372f263522aSJoseph Koshythe area when done.
373ebccf1e3SJoseph Koshy.Pp
374ebccf1e3SJoseph KoshyThe functions
375ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability ,
376ebccf1e3SJoseph Koshy.Fn pmc_name_of_class ,
377ebccf1e3SJoseph Koshy.Fn pmc_name_of_cputype ,
378ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition ,
379ebccf1e3SJoseph Koshy.Fn pmc_name_of_event ,
380ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode
381ebccf1e3SJoseph Koshyand
382ebccf1e3SJoseph Koshy.Fn pmc_name_of_state
383ebccf1e3SJoseph Koshyare useful for code wanting to print error messages.
384ebccf1e3SJoseph KoshyThey return
3859abe909bSRuslan Ermilov.Vt "const char *"
386ebccf1e3SJoseph Koshypointers to human-readable representations of their arguments.
387ebccf1e3SJoseph KoshyThese return values should not be freed using
388ebccf1e3SJoseph Koshy.Xr free 3 .
389ebccf1e3SJoseph Koshy.Pp
3909abe909bSRuslan ErmilovThe function
391ebccf1e3SJoseph Koshy.Fn pmc_event_names_of_class
392ebccf1e3SJoseph Koshyreturns a list of event names supported by a given PMC class
393ebccf1e3SJoseph Koshy.Fa cl .
394ebccf1e3SJoseph KoshyOn successful return, an array of
3959abe909bSRuslan Ermilov.Vt "const char *"
396ebccf1e3SJoseph Koshypointers to the names of valid events supported by class
397ebccf1e3SJoseph Koshy.Fa cl
398ebccf1e3SJoseph Koshyis allocated by the library using
399ebccf1e3SJoseph Koshy.Xr malloc 3 ,
400ebccf1e3SJoseph Koshyand a pointer to this array is returned in the location pointed to by
401ebccf1e3SJoseph Koshy.Fa eventnames .
402ebccf1e3SJoseph KoshyThe number of pointers allocated is returned in the location pointed
403ebccf1e3SJoseph Koshyto by
404ebccf1e3SJoseph Koshy.Fa nevents .
4059abe909bSRuslan Ermilov.Ss Administration
406ebccf1e3SJoseph KoshyIndividual PMCs may be enabled or disabled on a given CPU using
407ebccf1e3SJoseph Koshy.Fn pmc_enable
408ebccf1e3SJoseph Koshyand
409ebccf1e3SJoseph Koshy.Fn pmc_disable
410ebccf1e3SJoseph Koshyrespectively.
411ebccf1e3SJoseph KoshyFor these functions,
412ebccf1e3SJoseph Koshy.Fa cpu
413ebccf1e3SJoseph Koshyis the CPU number, and
414ebccf1e3SJoseph Koshy.Fa pmc
415ebccf1e3SJoseph Koshyis the index of the PMC to be operated on.
416ebccf1e3SJoseph KoshyOnly the super-user is allowed to enable and disable PMCs.
4179abe909bSRuslan Ermilov.Ss x86 Architecture Specific API
418ebccf1e3SJoseph KoshyThe
419f263522aSJoseph Koshy.Fn pmc_get_msr
420ebccf1e3SJoseph Koshyfunction returns the processor model specific register number
421ebccf1e3SJoseph Koshyassociated with
422ebccf1e3SJoseph Koshy.Fa pmc .
423ebccf1e3SJoseph KoshyApplications may use the x86
4249abe909bSRuslan Ermilov.Ic RDPMC
425ebccf1e3SJoseph Koshyinstruction to directly read the contents of the PMC.
426ebccf1e3SJoseph Koshy.Sh EVENT SPECIFIERS
427ebccf1e3SJoseph KoshyEvent specifiers are strings comprising of an event name, followed by
428ebccf1e3SJoseph Koshyoptional parameters modifying the semantics of the hardware event
429ebccf1e3SJoseph Koshybeing probed.
430ebccf1e3SJoseph KoshyEvent names are PMC architecture dependent, but the
431ebccf1e3SJoseph Koshy.Xr hwpmc 4
432ebccf1e3SJoseph Koshylibrary defines machine independent aliases for commonly used
433ebccf1e3SJoseph Koshyevents.
434ebccf1e3SJoseph Koshy.Ss Event Name Aliases
435ebccf1e3SJoseph KoshyEvent name aliases are CPU architecture independent names for commonly
436ebccf1e3SJoseph Koshyused events.
437ebccf1e3SJoseph KoshyThe following aliases are known to this version of the
438110e1704SRuslan Ermilov.Nm pmc
439ebccf1e3SJoseph Koshylibrary:
440ebccf1e3SJoseph Koshy.Bl -tag -width indent
441ebccf1e3SJoseph Koshy.It Li branches
442ebccf1e3SJoseph KoshyMeasure the number of branches retired.
443ebccf1e3SJoseph Koshy.It Li branch-mispredicts
444ebccf1e3SJoseph KoshyMeasure the number of retired branches that were mispredicted.
445ebccf1e3SJoseph Koshy.It Li cycles
446ebccf1e3SJoseph KoshyMeasure processor cycles.
447ebccf1e3SJoseph KoshyThis event is implemented using the processor's Time Stamp Counter
448ebccf1e3SJoseph Koshyregister.
449ebccf1e3SJoseph Koshy.It Li dc-misses
450ebccf1e3SJoseph KoshyMeasure the number of data cache misses.
451ebccf1e3SJoseph Koshy.It Li ic-misses
452ebccf1e3SJoseph KoshyMeasure the number of instruction cache misses.
453ebccf1e3SJoseph Koshy.It Li instructions
454ebccf1e3SJoseph KoshyMeasure the number of instructions retired.
455ebccf1e3SJoseph Koshy.It Li interrupts
456ebccf1e3SJoseph KoshyMeasure the number of interrupts seen.
457177a2f22SJoseph Koshy.It Li unhalted-cycles
458177a2f22SJoseph KoshyMeasure the number of cycles the processor is not in a halted
459177a2f22SJoseph Koshyor sleep state.
460ebccf1e3SJoseph Koshy.El
461ebccf1e3SJoseph Koshy.Ss Time Stamp Counter (TSC)
4629abe909bSRuslan ErmilovThe timestamp counter is a monotonically non-decreasing counter that
463ebccf1e3SJoseph Koshycounts processor cycles.
464ebccf1e3SJoseph Koshy.Pp
4659abe909bSRuslan ErmilovIn the i386 architecture, this counter may
466ebccf1e3SJoseph Koshybe selected by requesting an event with event specifier
4679abe909bSRuslan Ermilov.Dq Li tsc .
468ebccf1e3SJoseph KoshyThe
4699abe909bSRuslan Ermilov.Dq Li tsc
470ebccf1e3SJoseph Koshyevent does not support any further qualifiers.
471ebccf1e3SJoseph KoshyIt can only be allocated in system-wide counting mode,
472ebccf1e3SJoseph Koshyand is a read-only counter.
473ebccf1e3SJoseph KoshyMultiple processes are allowed to allocate the TSC.
474ebccf1e3SJoseph KoshyOnce allocated, it may be read using the
475ebccf1e3SJoseph Koshy.Fn pmc_read
476ebccf1e3SJoseph Koshyfunction, or by using the RDTSC instruction.
477ebccf1e3SJoseph Koshy.Ss AMD (K7) PMCs
478ebccf1e3SJoseph KoshyThese PMCs are present in the
479ebccf1e3SJoseph Koshy.Tn "AMD Athlon"
480ebccf1e3SJoseph Koshyseries of CPUs and are documented in:
481ebccf1e3SJoseph Koshy.Rs
482ebccf1e3SJoseph Koshy.%B "AMD Athlon Processor x86 Code Optimization Guide"
483ebccf1e3SJoseph Koshy.%N "Publication No. 22007"
484ebccf1e3SJoseph Koshy.%D "February 2002"
4859abe909bSRuslan Ermilov.%Q "Advanced Micro Devices, Inc."
486ebccf1e3SJoseph Koshy.Re
487ebccf1e3SJoseph Koshy.Pp
488ebccf1e3SJoseph KoshyEvent specifiers for AMD K7 PMCs can have the following optional
489ebccf1e3SJoseph Koshyqualifiers:
490ebccf1e3SJoseph Koshy.Bl -tag -width indent
491ebccf1e3SJoseph Koshy.It Li count= Ns Ar value
492ebccf1e3SJoseph KoshyConfigure the counter to increment only if the number of configured
493ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
494ebccf1e3SJoseph Koshy.Ar value .
495ebccf1e3SJoseph Koshy.It Li edge
496ebccf1e3SJoseph KoshyConfigure the counter to only count negated-to-asserted transitions
497ebccf1e3SJoseph Koshyof the conditions expressed by the other qualifiers.
498ebccf1e3SJoseph KoshyIn other words, the counter will increment only once whenever a given
499ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
500ebccf1e3SJoseph Koshywhich the condition remains true.
501ebccf1e3SJoseph Koshy.It Li inv
502ebccf1e3SJoseph KoshyInvert the sense of comparision when the
5039abe909bSRuslan Ermilov.Dq Li count
504ebccf1e3SJoseph Koshyqualifier is present, making the counter to increment when the
505ebccf1e3SJoseph Koshynumber of events per cycle is less than the value specified by
506ebccf1e3SJoseph Koshythe
5079abe909bSRuslan Ermilov.Dq Li count
508ebccf1e3SJoseph Koshyqualifier.
509ebccf1e3SJoseph Koshy.It Li os
510ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at privilege level 0.
511ebccf1e3SJoseph Koshy.It Li unitmask= Ns Ar mask
512ebccf1e3SJoseph KoshyThis qualifier is used to further qualify a select few events,
5139abe909bSRuslan Ermilov.Dq Li k7-dc-refills-from-l2 ,
5149abe909bSRuslan Ermilov.Dq Li k7-dc-refills-from-system
515ebccf1e3SJoseph Koshyand
5169abe909bSRuslan Ermilov.Dq Li k7-dc-writebacks .
517ebccf1e3SJoseph KoshyHere
518ebccf1e3SJoseph Koshy.Ar mask
5199abe909bSRuslan Ermilovis a string of the following characters optionally separated by
5209abe909bSRuslan Ermilov.Ql +
521ebccf1e3SJoseph Koshycharacters:
5229abe909bSRuslan Ermilov.Pp
523ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
524ebccf1e3SJoseph Koshy.It Li m
525ebccf1e3SJoseph KoshyCount operations for lines in the
526ebccf1e3SJoseph Koshy.Dq Modified
527ebccf1e3SJoseph Koshystate.
528ebccf1e3SJoseph Koshy.It Li o
529ebccf1e3SJoseph KoshyCount operations for lines in the
530ebccf1e3SJoseph Koshy.Dq Owner
531ebccf1e3SJoseph Koshystate.
532ebccf1e3SJoseph Koshy.It Li e
533ebccf1e3SJoseph KoshyCount operations for lines in the
534ebccf1e3SJoseph Koshy.Dq Exclusive
535ebccf1e3SJoseph Koshystate.
536ebccf1e3SJoseph Koshy.It Li s
537ebccf1e3SJoseph KoshyCount operations for lines in the
538ebccf1e3SJoseph Koshy.Dq Shared
539ebccf1e3SJoseph Koshystate.
540ebccf1e3SJoseph Koshy.It Li i
541ebccf1e3SJoseph KoshyCount operations for lines in the
542ebccf1e3SJoseph Koshy.Dq Invalid
543ebccf1e3SJoseph Koshystate.
544ebccf1e3SJoseph Koshy.El
5459abe909bSRuslan Ermilov.Pp
546ebccf1e3SJoseph KoshyIf no
5479abe909bSRuslan Ermilov.Dq Li unitmask
548ebccf1e3SJoseph Koshyqualifier is specified, the default is to count events for caches
549ebccf1e3SJoseph Koshylines in any of the above states.
550ebccf1e3SJoseph Koshy.It Li usr
551ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
552ebccf1e3SJoseph Koshyor 3.
553ebccf1e3SJoseph Koshy.El
5549abe909bSRuslan Ermilov.Pp
555ebccf1e3SJoseph KoshyIf neither of the
5569abe909bSRuslan Ermilov.Dq Li os
557ebccf1e3SJoseph Koshyor
5589abe909bSRuslan Ermilov.Dq Li usr
559ebccf1e3SJoseph Koshyqualifiers were specified, the default is to enable both.
560ebccf1e3SJoseph Koshy.Pp
5619abe909bSRuslan ErmilovThe event specifiers supported on AMD K7 PMCs are:
562ebccf1e3SJoseph Koshy.Bl -tag -width indent
563ebccf1e3SJoseph Koshy.It Li k7-dc-accesses
564ebccf1e3SJoseph KoshyCount data cache accesses.
565ebccf1e3SJoseph Koshy.It Li k7-dc-misses
566ebccf1e3SJoseph KoshyCount data cache misses.
567ebccf1e3SJoseph Koshy.It Li k7-dc-refills-from-l2 Op Li ,unitmask= Ns Ar mask
568ebccf1e3SJoseph KoshyCount data cache refills from L2 cache.
569ebccf1e3SJoseph KoshyThis event may be further qualified using the
5709abe909bSRuslan Ermilov.Dq Li unitmask
571ebccf1e3SJoseph Koshyqualifier.
572ebccf1e3SJoseph Koshy.It Li k7-dc-refills-from-system Op Li ,unitmask= Ns Ar mask
573ebccf1e3SJoseph KoshyCount data cache refills from system memory.
574ebccf1e3SJoseph KoshyThis event may be further qualified using the
5759abe909bSRuslan Ermilov.Dq Li unitmask
576ebccf1e3SJoseph Koshyqualifier.
577ebccf1e3SJoseph Koshy.It Li k7-dc-writebacks Op Li ,unitmask= Ns Ar mask
578ebccf1e3SJoseph KoshyCount data cache writebacks.
579ebccf1e3SJoseph KoshyThis event may be further qualified using the
5809abe909bSRuslan Ermilov.Dq Li unitmask
581ebccf1e3SJoseph Koshyqualifier.
582ebccf1e3SJoseph Koshy.It Li k7-l1-dtlb-miss-and-l2-dtlb-hits
583ebccf1e3SJoseph KoshyCount L1 DTLB misses and L2 DTLB hits.
584ebccf1e3SJoseph Koshy.It Li k7-l1-and-l2-dtlb-misses
585ebccf1e3SJoseph KoshyCount L1 and L2 DTLB misses.
586ebccf1e3SJoseph Koshy.It Li k7-misaligned-references
587ebccf1e3SJoseph KoshyCount misaligned data references.
588ebccf1e3SJoseph Koshy.It Li k7-ic-fetches
589ebccf1e3SJoseph KoshyCount instruction cache fetches.
590ebccf1e3SJoseph Koshy.It Li k7-ic-misses
591ebccf1e3SJoseph KoshyCount instruction cache misses.
592ebccf1e3SJoseph Koshy.It Li k7-l1-itlb-misses
593ebccf1e3SJoseph KoshyCount L1 ITLB misses that are L2 ITLB hits.
594ebccf1e3SJoseph Koshy.It Li k7-l1-l2-itlb-misses
595ebccf1e3SJoseph KoshyCount L1 (and L2) ITLB misses.
596ebccf1e3SJoseph Koshy.It Li k7-retired-instructions
597ebccf1e3SJoseph KoshyCount all retired instructions.
598ebccf1e3SJoseph Koshy.It Li k7-retired-ops
599ebccf1e3SJoseph KoshyCount retired ops.
600ebccf1e3SJoseph Koshy.It Li k7-retired-branches
601ebccf1e3SJoseph KoshyCount all retired branches (conditional, unconditional, exceptions
602ebccf1e3SJoseph Koshyand interrupts).
603ebccf1e3SJoseph Koshy.It Li k7-retired-branches-mispredicted
604ebccf1e3SJoseph KoshyCount all misprediced retired branches.
605ebccf1e3SJoseph Koshy.It Li k7-retired-taken-branches
606ebccf1e3SJoseph KoshyCount retired taken branches.
607ebccf1e3SJoseph Koshy.It Li k7-retired-taken-branches-mispredicted
608ebccf1e3SJoseph KoshyCount mispredicted taken branches that were retired.
609ebccf1e3SJoseph Koshy.It Li k7-retired-far-control-transfers
610ebccf1e3SJoseph KoshyCount retired far control transfers.
611ebccf1e3SJoseph Koshy.It Li k7-retired-resync-branches
612ebccf1e3SJoseph KoshyCount retired resync branches (non control transfer branches).
613ebccf1e3SJoseph Koshy.It Li k7-interrupts-masked-cycles
614ebccf1e3SJoseph KoshyCount the number of cycles when the processor's
6159abe909bSRuslan Ermilov.Va IF
616ebccf1e3SJoseph Koshyflag was zero.
617ebccf1e3SJoseph Koshy.It Li k7-interrupts-masked-while-pending-cycles
618ebccf1e3SJoseph KoshyCount the number of cycles interrupts were masked while pending due
619ebccf1e3SJoseph Koshyto the processor's
6209abe909bSRuslan Ermilov.Va IF
621ebccf1e3SJoseph Koshyflag being zero.
622ebccf1e3SJoseph Koshy.It Li k7-hardware-interrupts
623ebccf1e3SJoseph KoshyCount the number of taken hardware interrupts.
624ebccf1e3SJoseph Koshy.El
625ebccf1e3SJoseph Koshy.Ss AMD (K8) PMCs
626ebccf1e3SJoseph KoshyThese PMCs are present in the
627ebccf1e3SJoseph Koshy.Tn "AMD Athlon64"
628ebccf1e3SJoseph Koshyand
629ebccf1e3SJoseph Koshy.Tn "AMD Opteron"
630ebccf1e3SJoseph Koshyseries of CPUs.
631ebccf1e3SJoseph KoshyThey are documented in:
632ebccf1e3SJoseph Koshy.Rs
633ebccf1e3SJoseph Koshy.%B "BIOS and Kernel Developer's Guide for the AMD Athlon(tm) 64 and AMD Opteron Processors"
634ebccf1e3SJoseph Koshy.%N "Publication No. 26094"
635ebccf1e3SJoseph Koshy.%D "April 2004"
6369abe909bSRuslan Ermilov.%Q "Advanced Micro Devices, Inc."
637ebccf1e3SJoseph Koshy.Re
638ebccf1e3SJoseph Koshy.Pp
639ebccf1e3SJoseph KoshyEvent specifiers for AMD K8 PMCs can have the following optional
640ebccf1e3SJoseph Koshyqualifiers:
641ebccf1e3SJoseph Koshy.Bl -tag -width indent
642ebccf1e3SJoseph Koshy.It Li count= Ns Ar value
643ebccf1e3SJoseph KoshyConfigure the counter to increment only if the number of configured
644ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
645ebccf1e3SJoseph Koshy.Ar value .
646ebccf1e3SJoseph Koshy.It Li edge
647ebccf1e3SJoseph KoshyConfigure the counter to only count negated-to-asserted transitions
648ebccf1e3SJoseph Koshyof the conditions expressed by the other fields.
649ebccf1e3SJoseph KoshyIn other words, the counter will increment only once whenever a given
650ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
651ebccf1e3SJoseph Koshywhich the condition remains true.
652ebccf1e3SJoseph Koshy.It Li inv
653ebccf1e3SJoseph KoshyInvert the sense of comparision when the
6549abe909bSRuslan Ermilov.Dq Li count
655ebccf1e3SJoseph Koshyqualifier is present, making the counter to increment when the
656ebccf1e3SJoseph Koshynumber of events per cycle is less than the value specified by
657ebccf1e3SJoseph Koshythe
6589abe909bSRuslan Ermilov.Dq Li count
659ebccf1e3SJoseph Koshyqualifier.
660ebccf1e3SJoseph Koshy.It Li mask= Ns Ar qualifier
661ebccf1e3SJoseph KoshyMany event specifiers for AMD K8 PMCs need to be additionally
662ebccf1e3SJoseph Koshyqualified using a mask qualifier.
663ebccf1e3SJoseph KoshyThese additional qualifiers are event-specific and are documented
664ebccf1e3SJoseph Koshyalong with their associated event specifiers below.
665ebccf1e3SJoseph Koshy.It Li os
666ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at privilege level 0.
667ebccf1e3SJoseph Koshy.It Li usr
668ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
669ebccf1e3SJoseph Koshyor 3.
670ebccf1e3SJoseph Koshy.El
6719abe909bSRuslan Ermilov.Pp
672ebccf1e3SJoseph KoshyIf neither of the
6739abe909bSRuslan Ermilov.Dq Li os
674ebccf1e3SJoseph Koshyor
6759abe909bSRuslan Ermilov.Dq Li usr
676ebccf1e3SJoseph Koshyqualifiers were specified, the default is to enable both.
677ebccf1e3SJoseph Koshy.Pp
6789abe909bSRuslan ErmilovThe event specifiers supported on AMD K8 PMCs are:
679ebccf1e3SJoseph Koshy.Bl -tag -width indent
680ebccf1e3SJoseph Koshy.It Li k8-bu-cpu-clk-unhalted
681ebccf1e3SJoseph KoshyCount the number of clock cycles when the CPU is not in the HLT or
682ebccf1e3SJoseph KoshySTPCLK states.
683ebccf1e3SJoseph Koshy.It Li k8-bu-fill-request-l2-miss Op Li ,mask= Ns Ar qualifier
684ebccf1e3SJoseph KoshyCount fill requests that missed in the L2 cache.
685ebccf1e3SJoseph KoshyThis event may be further qualified using
686ebccf1e3SJoseph Koshy.Ar qualifier ,
687ebccf1e3SJoseph Koshywhich is a
6889abe909bSRuslan Ermilov.Ql +
689ebccf1e3SJoseph Koshyseparated set of the following keywords:
6909abe909bSRuslan Ermilov.Pp
6919abe909bSRuslan Ermilov.Bl -tag -width indent -compact
692ebccf1e3SJoseph Koshy.It Li dc-fill
693ebccf1e3SJoseph KoshyCount data cache fill requests.
694ebccf1e3SJoseph Koshy.It Li ic-fill
695ebccf1e3SJoseph KoshyCount instruction cache fill requests.
696ebccf1e3SJoseph Koshy.It Li tlb-reload
697ebccf1e3SJoseph KoshyCount TLB reloads.
698ebccf1e3SJoseph Koshy.El
6999abe909bSRuslan Ermilov.Pp
700ebccf1e3SJoseph KoshyThe default is to count all types of requests.
701ebccf1e3SJoseph Koshy.It Li k8-bu-internal-l2-request Op Li ,mask= Ns Ar qualifier
702ebccf1e3SJoseph KoshyCount internally generated requests to the L2 cache.
703ebccf1e3SJoseph KoshyThis event may be further qualified using
704ebccf1e3SJoseph Koshy.Ar qualifier ,
705ebccf1e3SJoseph Koshywhich is a
7069abe909bSRuslan Ermilov.Ql +
707ebccf1e3SJoseph Koshyseparated set of the following keywords:
7089abe909bSRuslan Ermilov.Pp
7099abe909bSRuslan Ermilov.Bl -tag -width indent -compact
710ebccf1e3SJoseph Koshy.It Li cancelled
711ebccf1e3SJoseph KoshyCount cancelled requests.
712ebccf1e3SJoseph Koshy.It Li dc-fill
713ebccf1e3SJoseph KoshyCount data cache fill requests.
714ebccf1e3SJoseph Koshy.It Li ic-fill
715ebccf1e3SJoseph KoshyCount instruction cache fill requests.
716ebccf1e3SJoseph Koshy.It Li tag-snoop
717ebccf1e3SJoseph KoshyCount tag snoop requests.
718ebccf1e3SJoseph Koshy.It Li tlb-reload
719ebccf1e3SJoseph KoshyCount TLB reloads.
720ebccf1e3SJoseph Koshy.El
7219abe909bSRuslan Ermilov.Pp
722ebccf1e3SJoseph KoshyThe default is to count all types of requests.
723ebccf1e3SJoseph Koshy.It Li k8-dc-access
724ebccf1e3SJoseph KoshyCount data cache accesses including microcode scratchpad accesses.
725ebccf1e3SJoseph Koshy.It Li k8-dc-copyback Op Li ,mask= Ns Ar qualifier
726ebccf1e3SJoseph KoshyCount data cache copyback operations.
727ebccf1e3SJoseph KoshyThis event may be further qualified using
728ebccf1e3SJoseph Koshy.Ar qualifier ,
729ebccf1e3SJoseph Koshywhich is a
7309abe909bSRuslan Ermilov.Ql +
731ebccf1e3SJoseph Koshyseparated set of the following keywords:
7329abe909bSRuslan Ermilov.Pp
7339abe909bSRuslan Ermilov.Bl -tag -width indent -compact
734ebccf1e3SJoseph Koshy.It Li exclusive
735ebccf1e3SJoseph KoshyCount operations for lines in the
736ebccf1e3SJoseph Koshy.Dq exclusive
737ebccf1e3SJoseph Koshystate.
738ebccf1e3SJoseph Koshy.It Li invalid
739ebccf1e3SJoseph KoshyCount operations for lines in the
740ebccf1e3SJoseph Koshy.Dq invalid
741ebccf1e3SJoseph Koshystate.
742ebccf1e3SJoseph Koshy.It Li modified
743ebccf1e3SJoseph KoshyCount operations for lines in the
744ebccf1e3SJoseph Koshy.Dq modified
745ebccf1e3SJoseph Koshystate.
746ebccf1e3SJoseph Koshy.It Li owner
747ebccf1e3SJoseph KoshyCount operations for lines in the
748ebccf1e3SJoseph Koshy.Dq owner
749ebccf1e3SJoseph Koshystate.
750ebccf1e3SJoseph Koshy.It Li shared
751ebccf1e3SJoseph KoshyCount operations for lines in the
752ebccf1e3SJoseph Koshy.Dq shared
753ebccf1e3SJoseph Koshystate.
754ebccf1e3SJoseph Koshy.El
7559abe909bSRuslan Ermilov.Pp
756ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
757ebccf1e3SJoseph Koshyabove states.
758ebccf1e3SJoseph Koshy.It Li k8-dc-dcache-accesses-by-locks Op Li ,mask= Ns Ar qualifier
759ebccf1e3SJoseph KoshyCount data cache accesses by lock instructions.
760ebccf1e3SJoseph KoshyThis event is only available on processors of revision C or later
761ebccf1e3SJoseph Koshyvintage.
762ebccf1e3SJoseph KoshyThis event may be further qualified using
763ebccf1e3SJoseph Koshy.Ar qualifier ,
764ebccf1e3SJoseph Koshywhich is a
7659abe909bSRuslan Ermilov.Ql +
766ebccf1e3SJoseph Koshyseparated set of the following keywords:
7679abe909bSRuslan Ermilov.Pp
7689abe909bSRuslan Ermilov.Bl -tag -width indent -compact
769ebccf1e3SJoseph Koshy.It Li accesses
770ebccf1e3SJoseph KoshyCount data cache accesses by lock instructions.
771ebccf1e3SJoseph Koshy.It Li misses
772ebccf1e3SJoseph KoshyCount data cache misses by lock instructions.
773ebccf1e3SJoseph Koshy.El
7749abe909bSRuslan Ermilov.Pp
775ebccf1e3SJoseph KoshyThe default is to count all accesses.
776ebccf1e3SJoseph Koshy.It Li k8-dc-dispatched-prefetch-instructions Op Li ,mask= Ns Ar qualifier
777ebccf1e3SJoseph KoshyCount the number of dispatched prefetch instructions.
778ebccf1e3SJoseph KoshyThis event may be further qualified using
779ebccf1e3SJoseph Koshy.Ar qualifier ,
780ebccf1e3SJoseph Koshywhich is a
7819abe909bSRuslan Ermilov.Ql +
782ebccf1e3SJoseph Koshyseparated set of the following keywords:
7839abe909bSRuslan Ermilov.Pp
7849abe909bSRuslan Ermilov.Bl -tag -width indent -compact
785ebccf1e3SJoseph Koshy.It Li load
786ebccf1e3SJoseph KoshyCount load operations.
787ebccf1e3SJoseph Koshy.It Li nta
788ebccf1e3SJoseph KoshyCount non-temporal operations.
789ebccf1e3SJoseph Koshy.It Li store
790ebccf1e3SJoseph KoshyCount store operations.
791ebccf1e3SJoseph Koshy.El
7929abe909bSRuslan Ermilov.Pp
793ebccf1e3SJoseph KoshyThe default is to count all operations.
794ebccf1e3SJoseph Koshy.It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-hit
795ebccf1e3SJoseph KoshyCount L1 DTLB misses that are L2 DTLB hits.
796ebccf1e3SJoseph Koshy.It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-miss
797ebccf1e3SJoseph KoshyCount L1 DTLB misses that are also misses in the L2 DTLB.
798ebccf1e3SJoseph Koshy.It Li k8-dc-microarchitectural-early-cancel-of-an-access
799ebccf1e3SJoseph KoshyCount microarchitectural early cancels of data cache accesses.
800ebccf1e3SJoseph Koshy.It Li k8-dc-microarchitectural-late-cancel-of-an-access
801ebccf1e3SJoseph KoshyCount microarchitectural late cancels of data cache accesses.
802ebccf1e3SJoseph Koshy.It Li k8-dc-misaligned-data-reference
803ebccf1e3SJoseph KoshyCount misaligned data references.
804ebccf1e3SJoseph Koshy.It Li k8-dc-miss
805ebccf1e3SJoseph KoshyCount data cache misses.
806ebccf1e3SJoseph Koshy.It Li k8-dc-one-bit-ecc-error Op Li ,mask= Ns Ar qualifier
807ebccf1e3SJoseph KoshyCount one bit ECC errors found by the scrubber.
808ebccf1e3SJoseph KoshyThis event may be further qualified using
809ebccf1e3SJoseph Koshy.Ar qualifier ,
810ebccf1e3SJoseph Koshywhich is a
8119abe909bSRuslan Ermilov.Ql +
812ebccf1e3SJoseph Koshyseparated set of the following keywords:
8139abe909bSRuslan Ermilov.Pp
8149abe909bSRuslan Ermilov.Bl -tag -width indent -compact
815ebccf1e3SJoseph Koshy.It Li scrubber
816ebccf1e3SJoseph KoshyCount scrubber detected errors.
817ebccf1e3SJoseph Koshy.It Li piggyback
818ebccf1e3SJoseph KoshyCount piggyback scrubber errors.
819ebccf1e3SJoseph Koshy.El
8209abe909bSRuslan Ermilov.Pp
821ebccf1e3SJoseph KoshyThe default is to count both kinds of errors.
822ebccf1e3SJoseph Koshy.It Li k8-dc-refill-from-l2 Op Li ,mask= Ns Ar qualifier
823ebccf1e3SJoseph KoshyCount data cache refills from L2 cache.
824ebccf1e3SJoseph KoshyThis event may be further qualified using
825ebccf1e3SJoseph Koshy.Ar qualifier ,
826ebccf1e3SJoseph Koshywhich is a
8279abe909bSRuslan Ermilov.Ql +
828ebccf1e3SJoseph Koshyseparated set of the following keywords:
8299abe909bSRuslan Ermilov.Pp
8309abe909bSRuslan Ermilov.Bl -tag -width indent -compact
831ebccf1e3SJoseph Koshy.It Li exclusive
832ebccf1e3SJoseph KoshyCount operations for lines in the
833ebccf1e3SJoseph Koshy.Dq exclusive
834ebccf1e3SJoseph Koshystate.
835ebccf1e3SJoseph Koshy.It Li invalid
836ebccf1e3SJoseph KoshyCount operations for lines in the
837ebccf1e3SJoseph Koshy.Dq invalid
838ebccf1e3SJoseph Koshystate.
839ebccf1e3SJoseph Koshy.It Li modified
840ebccf1e3SJoseph KoshyCount operations for lines in the
841ebccf1e3SJoseph Koshy.Dq modified
842ebccf1e3SJoseph Koshystate.
843ebccf1e3SJoseph Koshy.It Li owner
844ebccf1e3SJoseph KoshyCount operations for lines in the
845ebccf1e3SJoseph Koshy.Dq owner
846ebccf1e3SJoseph Koshystate.
847ebccf1e3SJoseph Koshy.It Li shared
848ebccf1e3SJoseph KoshyCount operations for lines in the
849ebccf1e3SJoseph Koshy.Dq shared
850ebccf1e3SJoseph Koshystate.
851ebccf1e3SJoseph Koshy.El
8529abe909bSRuslan Ermilov.Pp
853ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
854ebccf1e3SJoseph Koshyabove states.
855ebccf1e3SJoseph Koshy.It Li k8-dc-refill-from-system Op Li ,mask= Ns Ar qualifier
856ebccf1e3SJoseph KoshyCount data cache refills from system memory.
857ebccf1e3SJoseph KoshyThis event may be further qualified using
858ebccf1e3SJoseph Koshy.Ar qualifier ,
859ebccf1e3SJoseph Koshywhich is a
8609abe909bSRuslan Ermilov.Ql +
861ebccf1e3SJoseph Koshyseparated set of the following keywords:
8629abe909bSRuslan Ermilov.Pp
8639abe909bSRuslan Ermilov.Bl -tag -width indent -compact
864ebccf1e3SJoseph Koshy.It Li exclusive
865ebccf1e3SJoseph KoshyCount operations for lines in the
866ebccf1e3SJoseph Koshy.Dq exclusive
867ebccf1e3SJoseph Koshystate.
868ebccf1e3SJoseph Koshy.It Li invalid
869ebccf1e3SJoseph KoshyCount operations for lines in the
870ebccf1e3SJoseph Koshy.Dq invalid
871ebccf1e3SJoseph Koshystate.
872ebccf1e3SJoseph Koshy.It Li modified
873ebccf1e3SJoseph KoshyCount operations for lines in the
874ebccf1e3SJoseph Koshy.Dq modified
875ebccf1e3SJoseph Koshystate.
876ebccf1e3SJoseph Koshy.It Li owner
877ebccf1e3SJoseph KoshyCount operations for lines in the
878ebccf1e3SJoseph Koshy.Dq owner
879ebccf1e3SJoseph Koshystate.
880ebccf1e3SJoseph Koshy.It Li shared
881ebccf1e3SJoseph KoshyCount operations for lines in the
882ebccf1e3SJoseph Koshy.Dq shared
883ebccf1e3SJoseph Koshystate.
884ebccf1e3SJoseph Koshy.El
8859abe909bSRuslan Ermilov.Pp
886ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
887ebccf1e3SJoseph Koshyabove states.
888ebccf1e3SJoseph Koshy.It Li k8-fp-dispatched-fpu-ops Op Li ,mask= Ns Ar qualifier
889ebccf1e3SJoseph KoshyCount the number of dispatched FPU ops.
890ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
891ebccf1e3SJoseph KoshyThis event may be further qualified using
892ebccf1e3SJoseph Koshy.Ar qualifier ,
893ebccf1e3SJoseph Koshywhich is a
8949abe909bSRuslan Ermilov.Ql +
895ebccf1e3SJoseph Koshyseparated set of the following keywords:
8969abe909bSRuslan Ermilov.Pp
8979abe909bSRuslan Ermilov.Bl -tag -width indent -compact
898ebccf1e3SJoseph Koshy.It Li add-pipe-excluding-junk-ops
899ebccf1e3SJoseph KoshyCount add pipe ops excluding junk ops.
900ebccf1e3SJoseph Koshy.It Li add-pipe-junk-ops
901ebccf1e3SJoseph KoshyCount junk ops in the add pipe.
902ebccf1e3SJoseph Koshy.It Li multiply-pipe-excluding-junk-ops
903ebccf1e3SJoseph KoshyCount multiply pipe ops excluding junk ops.
904ebccf1e3SJoseph Koshy.It Li multiply-pipe-junk-ops
905ebccf1e3SJoseph KoshyCount junk ops in the multiply pipe.
906ebccf1e3SJoseph Koshy.It Li store-pipe-excluding-junk-ops
907ebccf1e3SJoseph KoshyCount store pipe ops excluding junk ops
908ebccf1e3SJoseph Koshy.It Li store-pipe-junk-ops
909ebccf1e3SJoseph KoshyCount junk ops in the store pipe.
910ebccf1e3SJoseph Koshy.El
9119abe909bSRuslan Ermilov.Pp
912ebccf1e3SJoseph KoshyThe default is to count all types of ops.
913ebccf1e3SJoseph Koshy.It Li k8-fp-cycles-with-no-fpu-ops-retired
914ebccf1e3SJoseph KoshyCount cycles when no FPU ops were retired.
915ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
916ebccf1e3SJoseph Koshy.It Li k8-fp-dispatched-fpu-fast-flag-ops
917ebccf1e3SJoseph KoshyCount dispatched FPU ops that use the fast flag interface.
918ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
919ebccf1e3SJoseph Koshy.It Li k8-fr-decoder-empty
920ebccf1e3SJoseph KoshyCount cycles when there was nothing to dispatch (i.e., the decoder
921ebccf1e3SJoseph Koshywas empty).
922ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stalls
923ebccf1e3SJoseph KoshyCount all dispatch stalls.
924ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-for-segment-load
925ebccf1e3SJoseph KoshyCount dispatch stalls for segment loads.
926ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-for-serialization
927ebccf1e3SJoseph KoshyCount dispatch stalls for serialization.
928ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-from-branch-abort-to-retire
929ebccf1e3SJoseph KoshyCount dispatch stalls from branch abort to retiral.
930ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-fpu-is-full
931ebccf1e3SJoseph KoshyCount dispatch stalls when the FPU is full.
932ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-ls-is-full
933ebccf1e3SJoseph KoshyCount dispatch stalls when the load/store unit is full.
934ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-reorder-buffer-is-full
935ebccf1e3SJoseph KoshyCount dispatch stalls when the reorder buffer is full.
936ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-reservation-stations-are-full
937ebccf1e3SJoseph KoshyCount dispatch stalls when reservation stations are full.
938ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-waiting-for-all-to-be-quiet
939ebccf1e3SJoseph KoshyCount dispatch stalls when waiting for all to be quiet.
940ebccf1e3SJoseph Koshy.\" XXX What does "waiting for all to be quiet" mean?
941ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-waiting-far-xfer-or-resync-branch-pending
942ebccf1e3SJoseph KoshyCount dispatch stalls when a far control transfer or a resync branch
943ebccf1e3SJoseph Koshyis pending.
944ebccf1e3SJoseph Koshy.It Li k8-fr-fpu-exceptions Op Li ,mask= Ns Ar qualifier
945ebccf1e3SJoseph KoshyCount FPU exceptions.
946ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
947ebccf1e3SJoseph KoshyThis event may be further qualified using
948ebccf1e3SJoseph Koshy.Ar qualifier ,
949ebccf1e3SJoseph Koshywhich is a
9509abe909bSRuslan Ermilov.Ql +
951ebccf1e3SJoseph Koshyseparated set of the following keywords:
9529abe909bSRuslan Ermilov.Pp
9539abe909bSRuslan Ermilov.Bl -tag -width indent -compact
954ebccf1e3SJoseph Koshy.It Li sse-and-x87-microtraps
955ebccf1e3SJoseph KoshyCount SSE and x87 microtraps.
956ebccf1e3SJoseph Koshy.It Li sse-reclass-microfaults
957ebccf1e3SJoseph KoshyCount SSE reclass microfaults
958ebccf1e3SJoseph Koshy.It Li sse-retype-microfaults
959ebccf1e3SJoseph KoshyCount SSE retype microfaults
960ebccf1e3SJoseph Koshy.It Li x87-reclass-microfaults
961ebccf1e3SJoseph KoshyCount x87 reclass microfaults.
962ebccf1e3SJoseph Koshy.El
9639abe909bSRuslan Ermilov.Pp
964ebccf1e3SJoseph KoshyThe default is to count all types of exceptions.
965ebccf1e3SJoseph Koshy.It Li k8-fr-interrupts-masked-cycles
966ebccf1e3SJoseph KoshyCount cycles when interrupts were masked (by CPU RFLAGS field IF was zero).
967ebccf1e3SJoseph Koshy.It Li k8-fr-interrupts-masked-while-pending-cycles
968ebccf1e3SJoseph KoshyCount cycles while interrupts were masked while pending (i.e., cycles
969ebccf1e3SJoseph Koshywhen INTR was asserted while CPU RFLAGS field IF was zero).
970ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr0
971ebccf1e3SJoseph KoshyCount the number of breakpoints for DR0.
972ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr1
973ebccf1e3SJoseph KoshyCount the number of breakpoints for DR1.
974ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr2
975ebccf1e3SJoseph KoshyCount the number of breakpoints for DR2.
976ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr3
977ebccf1e3SJoseph KoshyCount the number of breakpoints for DR3.
978ebccf1e3SJoseph Koshy.It Li k8-fr-retired-branches
979ebccf1e3SJoseph KoshyCount retired branches including exceptions and interrupts.
980ebccf1e3SJoseph Koshy.It Li k8-fr-retired-branches-mispredicted
981ebccf1e3SJoseph KoshyCount mispredicted retired branches.
982ebccf1e3SJoseph Koshy.It Li k8-fr-retired-far-control-transfers
983ebccf1e3SJoseph KoshyCount retired far control transfers (which are always mispredicted).
984ebccf1e3SJoseph Koshy.It Li k8-fr-retired-fastpath-double-op-instructions Op Li ,mask= Ns Ar qualifier
985ebccf1e3SJoseph KoshyCount retired fastpath double op instructions.
986ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
987ebccf1e3SJoseph KoshyThis event may be further qualified using
988ebccf1e3SJoseph Koshy.Ar qualifier ,
989ebccf1e3SJoseph Koshywhich is a
9909abe909bSRuslan Ermilov.Ql +
991ebccf1e3SJoseph Koshyseparated set of the following keywords:
9929abe909bSRuslan Ermilov.Pp
9939abe909bSRuslan Ermilov.Bl -tag -width indent -compact
994ebccf1e3SJoseph Koshy.It Li low-op-pos-0
995ebccf1e3SJoseph KoshyCount instructions with the low op in position 0.
996ebccf1e3SJoseph Koshy.It Li low-op-pos-1
997ebccf1e3SJoseph KoshyCount instructions with the low op in position 1.
998ebccf1e3SJoseph Koshy.It Li low-op-pos-2
999ebccf1e3SJoseph KoshyCount instructions with the low op in position 2.
1000ebccf1e3SJoseph Koshy.El
10019abe909bSRuslan Ermilov.Pp
1002ebccf1e3SJoseph KoshyThe default is to count all types of instructions.
1003ebccf1e3SJoseph Koshy.It Li k8-fr-retired-fpu-instructions Op Li ,mask= Ns Ar qualifier
1004ebccf1e3SJoseph KoshyCount retired FPU instructions.
1005ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
1006ebccf1e3SJoseph KoshyThis event may be further qualified using
1007ebccf1e3SJoseph Koshy.Ar qualifier ,
1008ebccf1e3SJoseph Koshywhich is a
10099abe909bSRuslan Ermilov.Ql +
1010ebccf1e3SJoseph Koshyseparated set of the following keywords:
10119abe909bSRuslan Ermilov.Pp
10129abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1013ebccf1e3SJoseph Koshy.It Li mmx-3dnow
10149abe909bSRuslan ErmilovCount MMX and 3DNow!\& instructions.
1015ebccf1e3SJoseph Koshy.It Li packed-sse-sse2
1016ebccf1e3SJoseph KoshyCount packed SSE and SSE2 instructions.
1017ebccf1e3SJoseph Koshy.It Li scalar-sse-sse2
1018ebccf1e3SJoseph KoshyCount scalar SSE and SSE2 instructions
1019ebccf1e3SJoseph Koshy.It Li x87
1020ebccf1e3SJoseph KoshyCount x87 instructions.
1021ebccf1e3SJoseph Koshy.El
10229abe909bSRuslan Ermilov.Pp
1023ebccf1e3SJoseph KoshyThe default is to count all types of instructions.
1024ebccf1e3SJoseph Koshy.It Li k8-fr-retired-near-returns
1025ebccf1e3SJoseph KoshyCount retired near returns.
1026ebccf1e3SJoseph Koshy.It Li k8-fr-retired-near-returns-mispredicted
1027ebccf1e3SJoseph KoshyCount mispredicted near returns.
1028ebccf1e3SJoseph Koshy.It Li k8-fr-retired-resyncs
1029ebccf1e3SJoseph KoshyCount retired resyncs (non-control transfer branches).
1030ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-hardware-interrupts
1031ebccf1e3SJoseph KoshyCount retired taken hardware interrupts.
1032ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches
1033ebccf1e3SJoseph KoshyCount retired taken branches.
1034ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches-mispredicted
1035ebccf1e3SJoseph KoshyCount retired taken branches that were mispredicted.
1036ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches-mispredicted-by-addr-miscompare
1037ebccf1e3SJoseph KoshyCount retired taken branches that were mispredicted only due to an
1038ebccf1e3SJoseph Koshyaddress miscompare.
1039ebccf1e3SJoseph Koshy.It Li k8-fr-retired-uops
1040ebccf1e3SJoseph KoshyCount retired uops.
1041ebccf1e3SJoseph Koshy.It Li k8-fr-retired-x86-instructions
1042ebccf1e3SJoseph KoshyCount retired x86 instructions including exceptions and interrupts.
1043ebccf1e3SJoseph Koshy.It Li k8-ic-fetch
1044ebccf1e3SJoseph KoshyCount instruction cache fetches.
1045ebccf1e3SJoseph Koshy.It Li k8-ic-instruction-fetch-stall
1046ebccf1e3SJoseph KoshyCount cycles in stalls due to instruction fetch.
1047ebccf1e3SJoseph Koshy.It Li k8-ic-l1-itlb-miss-and-l2-itlb-hit
1048ebccf1e3SJoseph KoshyCount L1 ITLB misses that are L2 ITLB hits.
1049ebccf1e3SJoseph Koshy.It Li k8-ic-l1-itlb-miss-and-l2-itlb-miss
1050ebccf1e3SJoseph KoshyCount ITLB misses that miss in both L1 and L2 ITLBs.
1051ebccf1e3SJoseph Koshy.It Li k8-ic-microarchitectural-resync-by-snoop
1052ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by snoops.
1053ebccf1e3SJoseph Koshy.It Li k8-ic-miss
1054ebccf1e3SJoseph KoshyCount instruction cache misses.
1055ebccf1e3SJoseph Koshy.It Li k8-ic-refill-from-l2
1056ebccf1e3SJoseph KoshyCount instruction cache refills from L2 cache.
1057ebccf1e3SJoseph Koshy.It Li k8-ic-refill-from-system
1058ebccf1e3SJoseph KoshyCount instruction cache refills from system memory.
1059ebccf1e3SJoseph Koshy.It Li k8-ic-return-stack-hits
1060ebccf1e3SJoseph KoshyCount hits to the return stack.
1061ebccf1e3SJoseph Koshy.It Li k8-ic-return-stack-overflow
1062ebccf1e3SJoseph KoshyCount overflows of the return stack.
1063ebccf1e3SJoseph Koshy.It Li k8-ls-buffer2-full
1064ebccf1e3SJoseph KoshyCount load/store buffer2 full events.
1065ebccf1e3SJoseph Koshy.It Li k8-ls-locked-operation Op Li ,mask= Ns Ar qualifier
1066ebccf1e3SJoseph KoshyCount locked operations.
1067ebccf1e3SJoseph KoshyFor revision C and later CPUs, the following qualifiers are supported:
10689abe909bSRuslan Ermilov.Pp
10699abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1070ebccf1e3SJoseph Koshy.It Li cycles-in-request
1071ebccf1e3SJoseph KoshyCount the number of cycles in the lock request/grant stage.
1072ebccf1e3SJoseph Koshy.It Li cycles-to-complete
1073ebccf1e3SJoseph KoshyCount the number of cycles a lock takes to complete once it is
1074ebccf1e3SJoseph Koshynon-speculative and is the older load/store operation.
1075ebccf1e3SJoseph Koshy.It Li locked-instructions
1076ebccf1e3SJoseph KoshyCount the number of lock instructions executed.
1077ebccf1e3SJoseph Koshy.El
10789abe909bSRuslan Ermilov.Pp
1079ebccf1e3SJoseph KoshyThe default is to count the number of lock instructions executed.
1080ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-late-cancel
1081ebccf1e3SJoseph KoshyCount microarchitectural late cancels of operations in the load/store
1082ebccf1e3SJoseph Koshyunit.
1083ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-resync-by-self-modifying-code
1084ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by self-modifying code.
1085ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-resync-by-snoop
1086ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by snoops.
1087ebccf1e3SJoseph Koshy.It Li k8-ls-retired-cflush-instructions
1088ebccf1e3SJoseph KoshyCount retired CFLUSH instructions.
1089ebccf1e3SJoseph Koshy.It Li k8-ls-retired-cpuid-instructions
1090ebccf1e3SJoseph KoshyCount retired CPUID instructions.
1091ebccf1e3SJoseph Koshy.It Li k8-ls-segment-register-load Op Li ,mask= Ns Ar qualifier
1092ebccf1e3SJoseph KoshyCount segment register loads.
1093ebccf1e3SJoseph KoshyThis event may be further qualified using
1094ebccf1e3SJoseph Koshy.Ar qualifier ,
1095ebccf1e3SJoseph Koshywhich is a
10969abe909bSRuslan Ermilov.Ql +
1097ebccf1e3SJoseph Koshyseparated set of the following keywords:
10989abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1099ebccf1e3SJoseph Koshy.It Li cs
1100ebccf1e3SJoseph KoshyCount CS register loads.
1101ebccf1e3SJoseph Koshy.It Li ds
1102ebccf1e3SJoseph KoshyCount DS register loads.
1103ebccf1e3SJoseph Koshy.It Li es
1104ebccf1e3SJoseph KoshyCount ES register loads.
1105ebccf1e3SJoseph Koshy.It Li fs
1106ebccf1e3SJoseph KoshyCount FS register loads.
1107ebccf1e3SJoseph Koshy.It Li gs
1108ebccf1e3SJoseph KoshyCount GS register loads.
11099abe909bSRuslan Ermilov.\" .It Li hs
1110ebccf1e3SJoseph Koshy.\" Count HS register loads.
1111ebccf1e3SJoseph Koshy.\" XXX "HS" register?
1112ebccf1e3SJoseph Koshy.It Li ss
1113ebccf1e3SJoseph KoshyCount SS register loads.
1114ebccf1e3SJoseph Koshy.El
11159abe909bSRuslan Ermilov.Pp
1116ebccf1e3SJoseph KoshyThe default is to count all types of loads.
1117ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-bypass-saturation Op Li ,mask= Ns Ar qualifier
1118ebccf1e3SJoseph KoshyCount memory controller bypass counter saturation events.
1119ebccf1e3SJoseph KoshyThis event may be further qualified using
1120ebccf1e3SJoseph Koshy.Ar qualifier ,
1121ebccf1e3SJoseph Koshywhich is a
11229abe909bSRuslan Ermilov.Ql +
1123ebccf1e3SJoseph Koshyseparated set of the following keywords:
11249abe909bSRuslan Ermilov.Pp
11259abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1126ebccf1e3SJoseph Koshy.It Li dram-controller-interface-bypass
1127ebccf1e3SJoseph KoshyCount DRAM controller interface bypass.
1128ebccf1e3SJoseph Koshy.It Li dram-controller-queue-bypass
1129ebccf1e3SJoseph KoshyCount DRAM controller queue bypass.
1130ebccf1e3SJoseph Koshy.It Li memory-controller-hi-pri-bypass
1131ebccf1e3SJoseph KoshyCount memory controller high priority bypasses.
1132ebccf1e3SJoseph Koshy.It Li memory-controller-lo-pri-bypass
1133ebccf1e3SJoseph KoshyCount memory controller low priority bypasses.
1134ebccf1e3SJoseph Koshy.El
11359abe909bSRuslan Ermilov.Pp
1136ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-dram-slots-missed
1137ebccf1e3SJoseph KoshyCount memory controller DRAM command slots missed (in MemClks).
1138ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-page-access-event Op Li ,mask= Ns Ar qualifier
1139ebccf1e3SJoseph KoshyCount memory controller page access events.
1140ebccf1e3SJoseph KoshyThis event may be further qualified using
1141ebccf1e3SJoseph Koshy.Ar qualifier ,
1142ebccf1e3SJoseph Koshywhich is a
11439abe909bSRuslan Ermilov.Ql +
1144ebccf1e3SJoseph Koshyseparated set of the following keywords:
11459abe909bSRuslan Ermilov.Pp
11469abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1147ebccf1e3SJoseph Koshy.It Li page-conflict
1148ebccf1e3SJoseph KoshyCount page conflicts.
1149ebccf1e3SJoseph Koshy.It Li page-hit
1150ebccf1e3SJoseph KoshyCount page hits.
1151ebccf1e3SJoseph Koshy.It Li page-miss
1152ebccf1e3SJoseph KoshyCount page misses.
1153ebccf1e3SJoseph Koshy.El
11549abe909bSRuslan Ermilov.Pp
1155ebccf1e3SJoseph KoshyThe default is to count all types of events.
1156ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-page-table-overflow
1157ebccf1e3SJoseph KoshyCount memory control page table overflow events.
1158ebccf1e3SJoseph Koshy.It Li k8-nb-probe-result Op Li ,mask= Ns Ar qualifier
1159ebccf1e3SJoseph KoshyCount probe events.
1160ebccf1e3SJoseph KoshyThis event may be further qualified using
1161ebccf1e3SJoseph Koshy.Ar qualifier ,
1162ebccf1e3SJoseph Koshywhich is a
11639abe909bSRuslan Ermilov.Ql +
1164ebccf1e3SJoseph Koshyseparated set of the following keywords:
11659abe909bSRuslan Ermilov.Pp
11669abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1167ebccf1e3SJoseph Koshy.It Li probe-hit
1168ebccf1e3SJoseph KoshyCount all probe hits.
1169ebccf1e3SJoseph Koshy.It Li probe-hit-dirty-no-memory-cancel
1170ebccf1e3SJoseph KoshyCount probe hits without memory cancels.
1171ebccf1e3SJoseph Koshy.It Li probe-hit-dirty-with-memory-cancel
1172ebccf1e3SJoseph KoshyCount probe hits with memory cancels.
1173ebccf1e3SJoseph Koshy.It Li probe-miss
1174ebccf1e3SJoseph KoshyCount probe misses.
1175ebccf1e3SJoseph Koshy.El
1176ebccf1e3SJoseph Koshy.It Li k8-nb-sized-commands Op Li ,mask= Ns Ar qualifier
1177ebccf1e3SJoseph KoshyCount sized commands issued.
1178ebccf1e3SJoseph KoshyThis event may be further qualified using
1179ebccf1e3SJoseph Koshy.Ar qualifier ,
1180ebccf1e3SJoseph Koshywhich is a
11819abe909bSRuslan Ermilov.Ql +
1182ebccf1e3SJoseph Koshyseparated set of the following keywords:
11839abe909bSRuslan Ermilov.Pp
11849abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1185ebccf1e3SJoseph Koshy.It Li nonpostwrszbyte
1186ebccf1e3SJoseph Koshy.It Li nonpostwrszdword
1187ebccf1e3SJoseph Koshy.It Li postwrszbyte
1188ebccf1e3SJoseph Koshy.It Li postwrszdword
1189ebccf1e3SJoseph Koshy.It Li rdszbyte
1190ebccf1e3SJoseph Koshy.It Li rdszdword
1191ebccf1e3SJoseph Koshy.It Li rdmodwr
1192ebccf1e3SJoseph Koshy.El
11939abe909bSRuslan Ermilov.Pp
1194ebccf1e3SJoseph KoshyThe default is to count all types of commands.
1195ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-turnaround Op Li ,mask= Ns Ar qualifier
1196ebccf1e3SJoseph KoshyCount memory control turnaround events.
1197ebccf1e3SJoseph KoshyThis event may be further qualified using
1198ebccf1e3SJoseph Koshy.Ar qualifier ,
1199ebccf1e3SJoseph Koshywhich is a
12009abe909bSRuslan Ermilov.Ql +
1201ebccf1e3SJoseph Koshyseparated set of the following keywords:
12029abe909bSRuslan Ermilov.Pp
12039abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1204ebccf1e3SJoseph Koshy.\" XXX doc is unclear whether these are cycle counts or event counts
1205ebccf1e3SJoseph Koshy.It Li dimm-turnaround
1206ebccf1e3SJoseph KoshyCount DIMM turnarounds.
1207ebccf1e3SJoseph Koshy.It Li read-to-write-turnaround
1208ebccf1e3SJoseph KoshyCount read to write turnarounds.
1209ebccf1e3SJoseph Koshy.It Li write-to-read-turnaround
1210ebccf1e3SJoseph KoshyCount write to read turnarounds.
1211ebccf1e3SJoseph Koshy.El
12129abe909bSRuslan Ermilov.Pp
1213ebccf1e3SJoseph KoshyThe default is to count all types of events.
1214ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus0-bandwidth Op Li ,mask= Ns Ar qualifier
1215ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus1-bandwidth Op Li ,mask= Ns Ar qualifier
1216ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus2-bandwidth Op Li ,mask= Ns Ar qualifier
1217ebccf1e3SJoseph KoshyCount events on the HyperTransport(tm) buses.
1218ebccf1e3SJoseph KoshyThese events may be further qualified using
1219ebccf1e3SJoseph Koshy.Ar qualifier ,
1220ebccf1e3SJoseph Koshywhich is a
12219abe909bSRuslan Ermilov.Ql +
1222ebccf1e3SJoseph Koshyseparated set of the following keywords:
12239abe909bSRuslan Ermilov.Pp
12249abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1225ebccf1e3SJoseph Koshy.It Li buffer-release
1226ebccf1e3SJoseph KoshyCount buffer release messages sent.
1227ebccf1e3SJoseph Koshy.It Li command
1228ebccf1e3SJoseph KoshyCount command messages sent.
1229ebccf1e3SJoseph Koshy.It Li data
1230ebccf1e3SJoseph KoshyCount data messages sent.
1231ebccf1e3SJoseph Koshy.It Li nop
1232ebccf1e3SJoseph KoshyCount nop messages sent.
1233ebccf1e3SJoseph Koshy.El
12349abe909bSRuslan Ermilov.Pp
1235ebccf1e3SJoseph KoshyThe default is to count all types of messages.
1236ebccf1e3SJoseph Koshy.El
1237ebccf1e3SJoseph Koshy.Ss Intel P6 PMCS
1238ebccf1e3SJoseph KoshyIntel P6 PMCs are present in Intel
1239ebccf1e3SJoseph Koshy.Tn "Pentium Pro" ,
1240ebccf1e3SJoseph Koshy.Tn "Pentium II" ,
12419abe909bSRuslan Ermilov.Tn Celeron ,
1242ebccf1e3SJoseph Koshy.Tn "Pentium III"
1243ebccf1e3SJoseph Koshyand
1244ebccf1e3SJoseph Koshy.Tn "Pentium M"
1245ebccf1e3SJoseph Koshyprocessors.
1246ebccf1e3SJoseph Koshy.Pp
1247ebccf1e3SJoseph KoshyThese CPUs have two counters.
1248ebccf1e3SJoseph KoshySome events may only be used on specific counters and some events are
1249ebccf1e3SJoseph Koshydefined only on specific processor models.
1250ebccf1e3SJoseph Koshy.Pp
1251ebccf1e3SJoseph KoshyThese PMCs are documented in
1252ebccf1e3SJoseph Koshy.Rs
1253ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
1254ebccf1e3SJoseph Koshy.%T "Volume 3: System Programming Guide"
1255ebccf1e3SJoseph Koshy.%N "Order Number 245472-012"
1256ebccf1e3SJoseph Koshy.%D 2003
1257ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
1258ebccf1e3SJoseph Koshy.Re
1259ebccf1e3SJoseph Koshy.Pp
126067edd229SJoseph KoshySome of these events are affected by processor errata described in
126167edd229SJoseph Koshy.Rs
126267edd229SJoseph Koshy.%B "Intel(R) Pentium(R) III Processor Specification Update"
126367edd229SJoseph Koshy.%N "Document Number: 244453-054"
126467edd229SJoseph Koshy.%D "April 2005"
126567edd229SJoseph Koshy.%Q "Intel Corporation"
126667edd229SJoseph Koshy.Re
126767edd229SJoseph Koshy.Pp
1268ebccf1e3SJoseph KoshyEvent specifiers for Intel P6 PMCs can have the following common
1269ebccf1e3SJoseph Koshyqualifiers:
1270ebccf1e3SJoseph Koshy.Bl -tag -width indent
1271ebccf1e3SJoseph Koshy.It Li cmask= Ns Ar value
1272ebccf1e3SJoseph KoshyConfigure the PMC to increment only if the number of configured
1273ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
1274ebccf1e3SJoseph Koshy.Ar value .
1275ebccf1e3SJoseph Koshy.It Li edge
1276ebccf1e3SJoseph KoshyConfigure the PMC to count the number of deasserted to asserted
1277ebccf1e3SJoseph Koshytransitions of the conditions expressed by the other qualifiers.
1278ebccf1e3SJoseph KoshyIf specified, the counter will increment only once whenever a
1279ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
1280ebccf1e3SJoseph Koshywhich the condition remains true.
1281ebccf1e3SJoseph Koshy.It Li inv
1282ebccf1e3SJoseph KoshyInvert the sense of comparision when the
12839abe909bSRuslan Ermilov.Dq Li cmask
1284ebccf1e3SJoseph Koshyqualifier is present, making the counter increment when the number of
1285ebccf1e3SJoseph Koshyevents per cycle is less than the value specified by the
12869abe909bSRuslan Ermilov.Dq Li cmask
1287ebccf1e3SJoseph Koshyqualifier.
1288ebccf1e3SJoseph Koshy.It Li os
1289ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at processor privilege
1290ebccf1e3SJoseph Koshylevel 0.
1291ebccf1e3SJoseph Koshy.It Li umask= Ns Ar value
1292ebccf1e3SJoseph KoshyThis qualifier is used to further qualify the event selected (see
1293ebccf1e3SJoseph Koshybelow).
1294ebccf1e3SJoseph Koshy.It Li usr
1295ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
1296ebccf1e3SJoseph Koshyor 3.
1297ebccf1e3SJoseph Koshy.El
12989abe909bSRuslan Ermilov.Pp
1299ebccf1e3SJoseph KoshyIf neither of the
13009abe909bSRuslan Ermilov.Dq Li os
1301ebccf1e3SJoseph Koshyor
13029abe909bSRuslan Ermilov.Dq Li usr
1303ebccf1e3SJoseph Koshyqualifiers are specified, the default is to enable both.
1304ebccf1e3SJoseph Koshy.Pp
1305ebccf1e3SJoseph KoshyThe event specifiers supported by Intel P6 PMCs are:
1306ebccf1e3SJoseph Koshy.Bl -tag -width indent
1307ebccf1e3SJoseph Koshy.It Li p6-baclears
1308ebccf1e3SJoseph KoshyCount the number of times a static branch prediction was made by the
1309ebccf1e3SJoseph Koshybranch decoder because the BTB did not have a prediction.
1310ebccf1e3SJoseph Koshy.It Li p6-br-bac-missp-exec
1311ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1312ebccf1e3SJoseph KoshyCount the number of branch instructions executed that where
1313ebccf1e3SJoseph Koshymispredicted at the Front End (BAC).
1314ebccf1e3SJoseph Koshy.It Li p6-br-bogus
1315ebccf1e3SJoseph KoshyCount the number of bogus branches.
1316ebccf1e3SJoseph Koshy.It Li p6-br-call-exec
1317ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1318ebccf1e3SJoseph KoshyCount the number of call instructions executed.
1319ebccf1e3SJoseph Koshy.It Li p6-br-call-missp-exec
1320ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1321ebccf1e3SJoseph KoshyCount the number of call instructions executed that were mispredicted.
1322ebccf1e3SJoseph Koshy.It Li p6-br-cnd-exec
1323ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1324ebccf1e3SJoseph KoshyCount the number of conditional branch instructions executed.
1325ebccf1e3SJoseph Koshy.It Li p6-br-cnd-missp-exec
1326ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1327ebccf1e3SJoseph KoshyCount the number of conditional branch instructions executed that were
1328ebccf1e3SJoseph Koshymispredicted.
1329ebccf1e3SJoseph Koshy.It Li p6-br-ind-call-exec
1330ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1331ebccf1e3SJoseph KoshyCount the number of indirect call instructions executed.
1332ebccf1e3SJoseph Koshy.It Li p6-br-ind-exec
1333ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1334ebccf1e3SJoseph KoshyCount the number of indirect branch instructions executed.
1335ebccf1e3SJoseph Koshy.It Li p6-br-ind-missp-exec
1336ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1337ebccf1e3SJoseph KoshyCount the number of indirect branch instructions executed that were
1338ebccf1e3SJoseph Koshymispredicted.
1339ebccf1e3SJoseph Koshy.It Li p6-br-inst-decoded
1340ebccf1e3SJoseph KoshyCount the number of branch instructions decoded.
1341ebccf1e3SJoseph Koshy.It Li p6-br-inst-exec
1342ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1343ebccf1e3SJoseph KoshyCount the number of branch instructions executed but necessarily retired.
1344ebccf1e3SJoseph Koshy.It Li p6-br-inst-retired
1345ebccf1e3SJoseph KoshyCount the number of branch instructions retired.
1346ebccf1e3SJoseph Koshy.It Li p6-br-miss-pred-retired
1347ebccf1e3SJoseph KoshyCount the number of mispredicted branch instructions retired.
1348ebccf1e3SJoseph Koshy.It Li p6-br-miss-pred-taken-ret
1349ebccf1e3SJoseph KoshyCount the number of taken mispredicted branches retired.
1350ebccf1e3SJoseph Koshy.It Li p6-br-missp-exec
1351ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1352ebccf1e3SJoseph KoshyCount the number of branch instructions executed that were
1353ebccf1e3SJoseph Koshymispredicted at execution.
1354ebccf1e3SJoseph Koshy.It Li p6-br-ret-bac-missp-exec
1355ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1356ebccf1e3SJoseph KoshyCount the number of return instructions executed that were
1357ebccf1e3SJoseph Koshymispredicted at the Front End (BAC).
1358ebccf1e3SJoseph Koshy.It Li p6-br-ret-exec
1359ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1360ebccf1e3SJoseph KoshyCount the number of return instructions executed.
1361ebccf1e3SJoseph Koshy.It Li p6-br-ret-missp-exec
1362ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1363ebccf1e3SJoseph KoshyCount the number of return instructions executed that were
1364ebccf1e3SJoseph Koshymispredicted at execution.
1365ebccf1e3SJoseph Koshy.It Li p6-br-taken-retired
1366ebccf1e3SJoseph KoshyCount the number of taken branches retired.
1367ebccf1e3SJoseph Koshy.It Li p6-btb-misses
1368ebccf1e3SJoseph KoshyCount the number of branches for which the BTB did not produce a
1369ebccf1e3SJoseph Koshyprediction.
1370ebccf1e3SJoseph Koshy.It Li p6-bus-bnr-drv
1371ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1372ebccf1e3SJoseph Koshydriving the BNR# pin.
1373ebccf1e3SJoseph Koshy.It Li p6-bus-data-rcv
1374ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1375ebccf1e3SJoseph Koshyreceiving data.
1376ebccf1e3SJoseph Koshy.It Li p6-bus-drdy-clocks Op Li ,umask= Ns Ar qualifier
1377ebccf1e3SJoseph KoshyCount the number of clocks during which DRDY# is asserted.
1378ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1379ebccf1e3SJoseph Koshyfollowing keywords:
13809abe909bSRuslan Ermilov.Pp
1381ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1382ebccf1e3SJoseph Koshy.It Li any
1383ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1384ebccf1e3SJoseph Koshy.It Li self
1385ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1386ebccf1e3SJoseph Koshy.El
13879abe909bSRuslan Ermilov.Pp
1388ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1389ebccf1e3SJoseph Koshy.It Li p6-bus-hit-drv
1390ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1391ebccf1e3SJoseph Koshydriving the HIT# pin.
1392ebccf1e3SJoseph Koshy.It Li p6-bus-hitm-drv
1393ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1394ebccf1e3SJoseph Koshydriving the HITM# pin.
1395ebccf1e3SJoseph Koshy.It Li p6-bus-lock-clocks Op Li ,umask= Ns Ar qualifier
1396ebccf1e3SJoseph KoshyCount the number of clocks during with LOCK# is asserted on the
1397ebccf1e3SJoseph Koshyexternal system bus.
1398ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1399ebccf1e3SJoseph Koshykeywords:
14009abe909bSRuslan Ermilov.Pp
1401ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1402ebccf1e3SJoseph Koshy.It Li any
1403ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1404ebccf1e3SJoseph Koshy.It Li self
1405ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1406ebccf1e3SJoseph Koshy.El
14079abe909bSRuslan Ermilov.Pp
1408ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1409ebccf1e3SJoseph Koshy.It Li p6-bus-req-outstanding
1410ebccf1e3SJoseph KoshyCount the number of bus requests outstanding in any given cycle.
1411ebccf1e3SJoseph Koshy.It Li p6-bus-snoop-stall
1412ebccf1e3SJoseph KoshyCount the number of clock cycles during which the bus is snoop stalled.
1413ebccf1e3SJoseph Koshy.It Li p6-bus-tran-any Op Li ,umask= Ns Ar qualifier
1414ebccf1e3SJoseph KoshyCount the number of completed bus transactions of any kind.
1415ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1416ebccf1e3SJoseph Koshykeywords:
14179abe909bSRuslan Ermilov.Pp
1418ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1419ebccf1e3SJoseph Koshy.It Li any
1420ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1421ebccf1e3SJoseph Koshy.It Li self
1422ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1423ebccf1e3SJoseph Koshy.El
14249abe909bSRuslan Ermilov.Pp
1425ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1426ebccf1e3SJoseph Koshy.It Li p6-bus-tran-brd Op Li ,umask= Ns Ar qualifier
1427ebccf1e3SJoseph KoshyCount the number of burst read transactions.
1428ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1429ebccf1e3SJoseph Koshykeywords:
14309abe909bSRuslan Ermilov.Pp
1431ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1432ebccf1e3SJoseph Koshy.It Li any
1433ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1434ebccf1e3SJoseph Koshy.It Li self
1435ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1436ebccf1e3SJoseph Koshy.El
14379abe909bSRuslan Ermilov.Pp
1438ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1439ebccf1e3SJoseph Koshy.It Li p6-bus-tran-burst Op Li ,umask= Ns Ar qualifier
1440ebccf1e3SJoseph KoshyCount the number of completed burst transactions.
1441ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1442ebccf1e3SJoseph Koshykeywords:
14439abe909bSRuslan Ermilov.Pp
1444ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1445ebccf1e3SJoseph Koshy.It Li any
1446ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1447ebccf1e3SJoseph Koshy.It Li self
1448ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1449ebccf1e3SJoseph Koshy.El
14509abe909bSRuslan Ermilov.Pp
1451ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1452ebccf1e3SJoseph Koshy.It Li p6-bus-tran-def Op Li ,umask= Ns Ar qualifier
1453ebccf1e3SJoseph KoshyCount the number of completed deferred transactions.
1454ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1455ebccf1e3SJoseph Koshykeywords:
14569abe909bSRuslan Ermilov.Pp
1457ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1458ebccf1e3SJoseph Koshy.It Li any
1459ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1460ebccf1e3SJoseph Koshy.It Li self
1461ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1462ebccf1e3SJoseph Koshy.El
14639abe909bSRuslan Ermilov.Pp
1464ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1465ebccf1e3SJoseph Koshy.It Li p6-bus-tran-ifetch Op Li ,umask= Ns Ar qualifier
1466ebccf1e3SJoseph KoshyCount the number of completed instruction fetch transactions.
1467ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1468ebccf1e3SJoseph Koshykeywords:
14699abe909bSRuslan Ermilov.Pp
1470ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1471ebccf1e3SJoseph Koshy.It Li any
1472ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1473ebccf1e3SJoseph Koshy.It Li self
1474ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1475ebccf1e3SJoseph Koshy.El
14769abe909bSRuslan Ermilov.Pp
1477ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1478ebccf1e3SJoseph Koshy.It Li p6-bus-tran-inval Op Li ,umask= Ns Ar qualifier
1479ebccf1e3SJoseph KoshyCount the number of completed invalidate transactions.
1480ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1481ebccf1e3SJoseph Koshykeywords:
14829abe909bSRuslan Ermilov.Pp
1483ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1484ebccf1e3SJoseph Koshy.It Li any
1485ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1486ebccf1e3SJoseph Koshy.It Li self
1487ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1488ebccf1e3SJoseph Koshy.El
14899abe909bSRuslan Ermilov.Pp
1490ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1491ebccf1e3SJoseph Koshy.It Li p6-bus-tran-mem Op Li ,umask= Ns Ar qualifier
1492ebccf1e3SJoseph KoshyCount the number of completed memory transactions.
1493ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1494ebccf1e3SJoseph Koshykeywords:
14959abe909bSRuslan Ermilov.Pp
1496ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1497ebccf1e3SJoseph Koshy.It Li any
1498ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1499ebccf1e3SJoseph Koshy.It Li self
1500ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1501ebccf1e3SJoseph Koshy.El
15029abe909bSRuslan Ermilov.Pp
1503ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1504ebccf1e3SJoseph Koshy.It Li p6-bus-tran-pwr Op Li ,umask= Ns Ar qualifier
1505ebccf1e3SJoseph KoshyCount the number of completed partial write transactions.
1506ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1507ebccf1e3SJoseph Koshykeywords:
15089abe909bSRuslan Ermilov.Pp
1509ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1510ebccf1e3SJoseph Koshy.It Li any
1511ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1512ebccf1e3SJoseph Koshy.It Li self
1513ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1514ebccf1e3SJoseph Koshy.El
15159abe909bSRuslan Ermilov.Pp
1516ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1517ebccf1e3SJoseph Koshy.It Li p6-bus-tran-rfo Op Li ,umask= Ns Ar qualifier
1518ebccf1e3SJoseph KoshyCount the number of completed read-for-ownership transactions.
1519ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1520ebccf1e3SJoseph Koshykeywords:
15219abe909bSRuslan Ermilov.Pp
1522ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1523ebccf1e3SJoseph Koshy.It Li any
1524ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1525ebccf1e3SJoseph Koshy.It Li self
1526ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1527ebccf1e3SJoseph Koshy.El
15289abe909bSRuslan Ermilov.Pp
1529ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1530ebccf1e3SJoseph Koshy.It Li p6-bus-trans-io Op Li ,umask= Ns Ar qualifier
1531ebccf1e3SJoseph KoshyCount the number of completed I/O transactions.
1532ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1533ebccf1e3SJoseph Koshykeywords:
15349abe909bSRuslan Ermilov.Pp
1535ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1536ebccf1e3SJoseph Koshy.It Li any
1537ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1538ebccf1e3SJoseph Koshy.It Li self
1539ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1540ebccf1e3SJoseph Koshy.El
15419abe909bSRuslan Ermilov.Pp
1542ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1543ebccf1e3SJoseph Koshy.It Li p6-bus-trans-p Op Li ,umask= Ns Ar qualifier
1544ebccf1e3SJoseph KoshyCount the number of completed partial transactions.
1545ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1546ebccf1e3SJoseph Koshykeywords:
15479abe909bSRuslan Ermilov.Pp
1548ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1549ebccf1e3SJoseph Koshy.It Li any
1550ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1551ebccf1e3SJoseph Koshy.It Li self
1552ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1553ebccf1e3SJoseph Koshy.El
15549abe909bSRuslan Ermilov.Pp
1555ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1556ebccf1e3SJoseph Koshy.It Li p6-bus-trans-wb Op Li ,umask= Ns Ar qualifier
1557ebccf1e3SJoseph KoshyCount the number of completed write-back transactions.
1558ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1559ebccf1e3SJoseph Koshykeywords:
15609abe909bSRuslan Ermilov.Pp
1561ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1562ebccf1e3SJoseph Koshy.It Li any
1563ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1564ebccf1e3SJoseph Koshy.It Li self
1565ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1566ebccf1e3SJoseph Koshy.El
15679abe909bSRuslan Ermilov.Pp
1568ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1569ebccf1e3SJoseph Koshy.It Li p6-cpu-clk-unhalted
1570ebccf1e3SJoseph KoshyCount the number of cycles during with the processor was not halted.
1571ebccf1e3SJoseph Koshy.Pp
1572ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1573ebccf1e3SJoseph KoshyCount the number of cycles during with the processor was not halted
1574ebccf1e3SJoseph Koshyand not in a thermal trip.
1575ebccf1e3SJoseph Koshy.It Li p6-cycles-div-busy
1576ebccf1e3SJoseph KoshyCount the number of cycles during which the divider is busy and cannot
1577ebccf1e3SJoseph Koshyaccept new divides.
1578ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1579ebccf1e3SJoseph Koshy.It Li p6-cycles-in-pending-and-masked
1580ebccf1e3SJoseph KoshyCount the number of processor cycles for which interrupts were
1581ebccf1e3SJoseph Koshydisabled and interrupts were pending.
1582ebccf1e3SJoseph Koshy.It Li p6-cycles-int-masked
1583ebccf1e3SJoseph KoshyCount the number of processor cycles for which interrupts were
1584ebccf1e3SJoseph Koshydisabled.
1585ebccf1e3SJoseph Koshy.It Li p6-data-mem-refs
1586ebccf1e3SJoseph KoshyCount all loads and all stores using any memory type, including
1587ebccf1e3SJoseph Koshyinternal retries.
15889abe909bSRuslan ErmilovEach part of a split store is counted separately.
1589ebccf1e3SJoseph Koshy.It Li p6-dcu-lines-in
1590ebccf1e3SJoseph KoshyCount the total lines allocated in the data cache unit.
1591ebccf1e3SJoseph Koshy.It Li p6-dcu-m-lines-in
1592ebccf1e3SJoseph KoshyCount the number of M state lines allocated in the data cache unit.
1593ebccf1e3SJoseph Koshy.It Li p6-dcu-m-lines-out
1594ebccf1e3SJoseph KoshyCount the number of M state lines evicted from the data cache unit.
1595ebccf1e3SJoseph Koshy.It Li p6-dcu-miss-outstanding
1596ebccf1e3SJoseph KoshyCount the weighted number of cycles while a data cache unit miss is
1597ebccf1e3SJoseph Koshyoutstanding, incremented by the number of outstanding cache misses at
1598ebccf1e3SJoseph Koshyany time.
1599ebccf1e3SJoseph Koshy.It Li p6-div
1600ebccf1e3SJoseph KoshyCount the number of floating point multiplies.
1601ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
1602ebccf1e3SJoseph Koshy.It Li p6-emon-esp-uops
1603ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1604ebccf1e3SJoseph KoshyCount the total number of micro-ops.
1605ebccf1e3SJoseph Koshy.It Li p6-emon-est-trans Op Li ,umask= Ns Ar qualifier
1606ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1607ebccf1e3SJoseph KoshyCount the number of
1608ebccf1e3SJoseph Koshy.Tn "Enhanced Intel SpeedStep"
1609ebccf1e3SJoseph Koshytransitions.
1610ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and can be one of the
1611ebccf1e3SJoseph Koshyfollowing keywords:
16129abe909bSRuslan Ermilov.Pp
1613ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1614ebccf1e3SJoseph Koshy.It Li all
1615ebccf1e3SJoseph KoshyCount all transitions.
1616ebccf1e3SJoseph Koshy.It Li freq
1617ebccf1e3SJoseph KoshyCount only frequency transitions.
1618ebccf1e3SJoseph Koshy.El
16199abe909bSRuslan Ermilov.Pp
1620ebccf1e3SJoseph KoshyThe default is to count all transitions.
1621ebccf1e3SJoseph Koshy.It Li p6-emon-fused-uops-ret Op Li ,umask= Ns Ar qualifier
1622ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1623ebccf1e3SJoseph KoshyCount the number of retired fused micro-ops.
1624ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and may be one of the
1625ebccf1e3SJoseph Koshyfollowing keywords:
16269abe909bSRuslan Ermilov.Pp
1627ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1628ebccf1e3SJoseph Koshy.It Li all
1629ebccf1e3SJoseph KoshyCount all fused micro-ops.
1630ebccf1e3SJoseph Koshy.It Li loadop
1631ebccf1e3SJoseph KoshyCount only load and op micro-ops.
1632ebccf1e3SJoseph Koshy.It Li stdsta
1633ebccf1e3SJoseph KoshyCount only STD/STA micro-ops.
1634ebccf1e3SJoseph Koshy.El
16359abe909bSRuslan Ermilov.Pp
1636ebccf1e3SJoseph KoshyThe default is to count all fused micro-ops.
1637ebccf1e3SJoseph Koshy.It Li p6-emon-kni-comp-inst-ret
1638ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1639ebccf1e3SJoseph KoshyCount the number of SSE computational instructions retired.
1640ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1641ebccf1e3SJoseph Koshyfollowing keywords:
16429abe909bSRuslan Ermilov.Pp
1643ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1644ebccf1e3SJoseph Koshy.It Li packed-and-scalar
1645ebccf1e3SJoseph KoshyCount packed and scalar operations.
1646ebccf1e3SJoseph Koshy.It Li scalar
1647ebccf1e3SJoseph KoshyCount scalar operations only.
1648ebccf1e3SJoseph Koshy.El
16499abe909bSRuslan Ermilov.Pp
1650ebccf1e3SJoseph KoshyThe default is to count packed and scalar operations.
1651ebccf1e3SJoseph Koshy.It Li p6-emon-kni-inst-retired Op Li ,umask= Ns Ar qualifier
1652ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1653ebccf1e3SJoseph KoshyCount the number of SSE instructions retired.
1654ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1655ebccf1e3SJoseph Koshyfollowing keywords:
16569abe909bSRuslan Ermilov.Pp
1657ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1658ebccf1e3SJoseph Koshy.It Li packed-and-scalar
1659ebccf1e3SJoseph KoshyCount packed and scalar operations.
1660ebccf1e3SJoseph Koshy.It Li scalar
1661ebccf1e3SJoseph KoshyCount scalar operations only.
1662ebccf1e3SJoseph Koshy.El
16639abe909bSRuslan Ermilov.Pp
1664ebccf1e3SJoseph KoshyThe default is to count packed and scalar operations.
1665ebccf1e3SJoseph Koshy.It Li p6-emon-kni-pref-dispatched Op Li ,umask= Ns Ar qualifier
1666ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1667ebccf1e3SJoseph KoshyCount the number of SSE prefetch or weakly ordered instructions
1668ebccf1e3SJoseph Koshydispatched (including speculative prefetches).
1669ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1670ebccf1e3SJoseph Koshyfollowing keywords:
16719abe909bSRuslan Ermilov.Pp
1672ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1673ebccf1e3SJoseph Koshy.It Li nta
1674ebccf1e3SJoseph KoshyCount non-temporal prefetches.
1675ebccf1e3SJoseph Koshy.It Li t1
1676ebccf1e3SJoseph KoshyCount prefetches to L1.
1677ebccf1e3SJoseph Koshy.It Li t2
1678ebccf1e3SJoseph KoshyCount prefetches to L2.
1679ebccf1e3SJoseph Koshy.It Li wos
1680ebccf1e3SJoseph KoshyCount weakly ordered stores.
1681ebccf1e3SJoseph Koshy.El
16829abe909bSRuslan Ermilov.Pp
1683ebccf1e3SJoseph KoshyThe default is to count non-temporal prefetches.
1684ebccf1e3SJoseph Koshy.It Li p6-emon-kni-pref-miss Op Li ,umask= Ns Ar qualifier
1685ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1686ebccf1e3SJoseph KoshyCount the number of prefetch or weakly ordered instructions that miss
1687ebccf1e3SJoseph Koshyall caches.
1688ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1689ebccf1e3SJoseph Koshyfollowing keywords:
16909abe909bSRuslan Ermilov.Pp
1691ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1692ebccf1e3SJoseph Koshy.It Li nta
1693ebccf1e3SJoseph KoshyCount non-temporal prefetches.
1694ebccf1e3SJoseph Koshy.It Li t1
1695ebccf1e3SJoseph KoshyCount prefetches to L1.
1696ebccf1e3SJoseph Koshy.It Li t2
1697ebccf1e3SJoseph KoshyCount prefetches to L2.
1698ebccf1e3SJoseph Koshy.It Li wos
1699ebccf1e3SJoseph KoshyCount weakly ordered stores.
1700ebccf1e3SJoseph Koshy.El
17019abe909bSRuslan Ermilov.Pp
1702ebccf1e3SJoseph KoshyThe default is to count non-temporal prefetches.
1703ebccf1e3SJoseph Koshy.It Li p6-emon-pref-rqsts-dn
1704ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1705ebccf1e3SJoseph KoshyCount the number of downward prefetches issued.
1706ebccf1e3SJoseph Koshy.It Li p6-emon-pref-rqsts-up
1707ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1708ebccf1e3SJoseph KoshyCount the number of upward prefetches issued.
1709ebccf1e3SJoseph Koshy.It Li p6-emon-simd-instr-retired
1710ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1711ebccf1e3SJoseph KoshyCount the number of retired
1712ebccf1e3SJoseph Koshy.Tn MMX
1713ebccf1e3SJoseph Koshyinstructions.
1714ebccf1e3SJoseph Koshy.It Li p6-emon-sse-sse2-comp-inst-retired Op Li ,umask= Ns Ar qualifier
1715ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1716ebccf1e3SJoseph KoshyCount the number of computational SSE instructions retired.
1717ebccf1e3SJoseph KoshyAn additional qualifier may be specified and can be one of the
1718ebccf1e3SJoseph Koshyfollowing keywords:
17199abe909bSRuslan Ermilov.Pp
1720ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1721ebccf1e3SJoseph Koshy.It Li sse-packed-single
1722ebccf1e3SJoseph KoshyCount SSE packed-single instructions.
1723ebccf1e3SJoseph Koshy.It Li sse-scalar-single
1724ebccf1e3SJoseph KoshyCount SSE scalar-single instructions.
1725ebccf1e3SJoseph Koshy.It Li sse2-packed-double
1726ebccf1e3SJoseph KoshyCount SSE2 packed-double instructions.
1727ebccf1e3SJoseph Koshy.It Li sse2-scalar-double
1728ebccf1e3SJoseph KoshyCount SSE2 scalar-double instructions.
1729ebccf1e3SJoseph Koshy.El
17309abe909bSRuslan Ermilov.Pp
1731ebccf1e3SJoseph KoshyThe default is to count SSE packed-single instructions.
1732ebccf1e3SJoseph Koshy.It Li p6-emon-sse-sse2-inst-retired Op Li ,umask= Ns Ar qualifer
1733ebccf1e3SJoseph Koshy.Pp
1734ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1735ebccf1e3SJoseph KoshyCount the number of SSE instructions retired.
1736ebccf1e3SJoseph KoshyAn additional qualifier can be specified, and can be one of the
1737ebccf1e3SJoseph Koshyfollowing keywords:
17389abe909bSRuslan Ermilov.Pp
1739ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1740ebccf1e3SJoseph Koshy.It Li sse-packed-single
1741ebccf1e3SJoseph KoshyCount SSE packed-single instructions.
1742ebccf1e3SJoseph Koshy.It Li sse-packed-single-scalar-single
1743ebccf1e3SJoseph KoshyCount SSE packed-single and scalar-single instructions.
1744ebccf1e3SJoseph Koshy.It Li sse2-packed-double
1745ebccf1e3SJoseph KoshyCount SSE2 packed-double instructions.
1746ebccf1e3SJoseph Koshy.It Li sse2-scalar-double
1747ebccf1e3SJoseph KoshyCount SSE2 scalar-double instructions.
1748ebccf1e3SJoseph Koshy.El
17499abe909bSRuslan Ermilov.Pp
1750ebccf1e3SJoseph KoshyThe default is to count SSE packed-single instructions.
1751ebccf1e3SJoseph Koshy.It Li p6-emon-synch-uops
1752ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1753ebccf1e3SJoseph KoshyCount the number of sync micro-ops.
1754ebccf1e3SJoseph Koshy.It Li p6-emon-thermal-trip
1755ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1756ebccf1e3SJoseph KoshyCount the duration or occurrences of thermal trips.
1757ebccf1e3SJoseph KoshyUse the
17589abe909bSRuslan Ermilov.Dq Li edge
1759ebccf1e3SJoseph Koshyqualifier to count occurrences of thermal trips.
1760ebccf1e3SJoseph Koshy.It Li p6-emon-unfusion
1761ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1762ebccf1e3SJoseph KoshyCount the number of unfusion events in the reorder buffer.
1763ebccf1e3SJoseph Koshy.It Li p6-flops
1764ebccf1e3SJoseph KoshyCount the number of computational floating point operations retired.
1765ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1766ebccf1e3SJoseph Koshy.It Li p6-fp-assist
1767ebccf1e3SJoseph KoshyCount the number of floating point exceptions handled by microcode.
1768ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
1769ebccf1e3SJoseph Koshy.It Li p6-fp-comps-ops-exe
1770ebccf1e3SJoseph KoshyCount the number of computation floating point operations executed.
1771ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1772ebccf1e3SJoseph Koshy.It Li p6-fp-mmx-trans Op Li ,umask= Ns Ar qualifier
1773ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
1774ebccf1e3SJoseph KoshyCount the number of transitions between MMX and floating-point
1775ebccf1e3SJoseph Koshyinstructions.
1776ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1777ebccf1e3SJoseph Koshyfollowing keywords:
17789abe909bSRuslan Ermilov.Pp
1779ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1780ebccf1e3SJoseph Koshy.It Li mmxtofp
1781ebccf1e3SJoseph KoshyCount transitions from MMX instructions to floating-point instructions.
1782ebccf1e3SJoseph Koshy.It Li fptommx
1783ebccf1e3SJoseph KoshyCount transitions from floating-point instructions to MMX instructions.
1784ebccf1e3SJoseph Koshy.El
17859abe909bSRuslan Ermilov.Pp
1786ebccf1e3SJoseph KoshyThe default is to count MMX to floating-point transitions.
1787ebccf1e3SJoseph Koshy.It Li p6-hw-int-rx
1788ebccf1e3SJoseph KoshyCount the number of hardware interrupts received.
1789ebccf1e3SJoseph Koshy.It Li p6-ifu-fetch
1790ebccf1e3SJoseph KoshyCount the number of instruction fetches, both cacheable and non-cacheable.
1791ebccf1e3SJoseph Koshy.It Li p6-ifu-fetch-miss
1792ebccf1e3SJoseph KoshyCount the number of instruction fetch misses (i.e., those that produce
1793ebccf1e3SJoseph Koshymemory accesses).
1794ebccf1e3SJoseph Koshy.It Li p6-ifu-mem-stall
1795ebccf1e3SJoseph KoshyCount the number of cycles instruction fetch is stalled for any reason.
1796ebccf1e3SJoseph Koshy.It Li p6-ild-stall
1797ebccf1e3SJoseph KoshyCount the number of cycles the instruction length decoder is stalled.
1798ebccf1e3SJoseph Koshy.It Li p6-inst-decoded
1799ebccf1e3SJoseph KoshyCount the number of instructions decoded.
1800ebccf1e3SJoseph Koshy.It Li p6-inst-retired
1801ebccf1e3SJoseph KoshyCount the number of instructions retired.
1802ebccf1e3SJoseph Koshy.It Li p6-itlb-miss
1803ebccf1e3SJoseph KoshyCount the number of instruction TLB misses.
1804ebccf1e3SJoseph Koshy.It Li p6-l2-ads
1805ebccf1e3SJoseph KoshyCount the number of L2 address strobes.
1806ebccf1e3SJoseph Koshy.It Li p6-l2-dbus-busy
1807ebccf1e3SJoseph KoshyCount the number of cycles during which the L2 cache data bus was busy.
1808ebccf1e3SJoseph Koshy.It Li p6-l2-dbus-busy-rd
1809ebccf1e3SJoseph KoshyCount the number of cycles during which the L2 cache data bus was busy
1810ebccf1e3SJoseph Koshytransferring read data from L2 to the processor.
1811ebccf1e3SJoseph Koshy.It Li p6-l2-ifetch Op Li ,umask= Ns Ar qualifier
1812ebccf1e3SJoseph KoshyCount the number of L2 instruction fetches.
1813ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1814ebccf1e3SJoseph Koshykeywords separated by
18159abe909bSRuslan Ermilov.Ql +
1816ebccf1e3SJoseph Koshycharacters:
18179abe909bSRuslan Ermilov.Pp
1818ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1819ebccf1e3SJoseph Koshy.It Li e
1820ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1821ebccf1e3SJoseph Koshy.It Li i
1822ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1823ebccf1e3SJoseph Koshy.It Li m
1824ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1825ebccf1e3SJoseph Koshy.It Li s
1826ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1827ebccf1e3SJoseph Koshy.El
18289abe909bSRuslan Ermilov.Pp
1829ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
1830ebccf1e3SJoseph Koshy.It Li p6-l2-ld Op Li ,umask= Ns Ar qualifier
1831ebccf1e3SJoseph KoshyCount the number of L2 data loads.
1832ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1833ebccf1e3SJoseph Koshykeywords separated by
18349abe909bSRuslan Ermilov.Ql +
1835ebccf1e3SJoseph Koshycharacters:
18369abe909bSRuslan Ermilov.Pp
1837ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1838ebccf1e3SJoseph Koshy.It Li both
1839ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1840ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1841ebccf1e3SJoseph Koshy.It Li e
1842ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1843ebccf1e3SJoseph Koshy.It Li hw
1844ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1845ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1846ebccf1e3SJoseph Koshy.It Li i
1847ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1848ebccf1e3SJoseph Koshy.It Li m
1849ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1850ebccf1e3SJoseph Koshy.It Li nonhw
1851ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1852ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1853ebccf1e3SJoseph Koshy.It Li s
1854ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1855ebccf1e3SJoseph Koshy.El
18569abe909bSRuslan Ermilov.Pp
1857ebccf1e3SJoseph KoshyThe default on processors other than
1858ebccf1e3SJoseph Koshy.Tn "Pentium M"
1859ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1860ebccf1e3SJoseph KoshyThe default on
1861ebccf1e3SJoseph Koshy.Tn "Pentium M"
1862ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1863ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
186467edd229SJoseph Koshy.Pq Errata
186567edd229SJoseph KoshyThis event is affected by processor errata E53.
1866ebccf1e3SJoseph Koshy.It Li p6-l2-lines-in Op Li ,umask= Ns Ar qualifier
1867ebccf1e3SJoseph KoshyCount the number of L2 lines allocated.
1868ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1869ebccf1e3SJoseph Koshykeywords separated by
18709abe909bSRuslan Ermilov.Ql +
1871ebccf1e3SJoseph Koshycharacters:
18729abe909bSRuslan Ermilov.Pp
1873ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1874ebccf1e3SJoseph Koshy.It Li both
1875ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1876ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1877ebccf1e3SJoseph Koshy.It Li e
1878ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1879ebccf1e3SJoseph Koshy.It Li hw
1880ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1881ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1882ebccf1e3SJoseph Koshy.It Li i
1883ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1884ebccf1e3SJoseph Koshy.It Li m
1885ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1886ebccf1e3SJoseph Koshy.It Li nonhw
1887ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1888ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1889ebccf1e3SJoseph Koshy.It Li s
1890ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1891ebccf1e3SJoseph Koshy.El
18929abe909bSRuslan Ermilov.Pp
1893ebccf1e3SJoseph KoshyThe default on processors other than
1894ebccf1e3SJoseph Koshy.Tn "Pentium M"
1895ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1896ebccf1e3SJoseph KoshyThe default on
1897ebccf1e3SJoseph Koshy.Tn "Pentium M"
1898ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1899ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
190067edd229SJoseph Koshy.Pq Errata
190167edd229SJoseph KoshyThis event is affected by processor errata E45.
1902ebccf1e3SJoseph Koshy.It Li p6-l2-lines-out Op Li ,umask= Ns Ar qualifier
1903ebccf1e3SJoseph KoshyCount the number of L2 lines evicted.
1904ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1905ebccf1e3SJoseph Koshykeywords separated by
19069abe909bSRuslan Ermilov.Ql +
1907ebccf1e3SJoseph Koshycharacters:
19089abe909bSRuslan Ermilov.Pp
1909ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1910ebccf1e3SJoseph Koshy.It Li both
1911ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1912ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1913ebccf1e3SJoseph Koshy.It Li e
1914ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1915ebccf1e3SJoseph Koshy.It Li hw
1916ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1917ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1918ebccf1e3SJoseph Koshy.It Li i
1919ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1920ebccf1e3SJoseph Koshy.It Li m
1921ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1922ebccf1e3SJoseph Koshy.It Li nonhw
1923ebccf1e3SJoseph Koshy.Pq Tn "Pentium M" only
1924ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1925ebccf1e3SJoseph Koshy.It Li s
1926ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1927ebccf1e3SJoseph Koshy.El
19289abe909bSRuslan Ermilov.Pp
1929ebccf1e3SJoseph KoshyThe default on processors other than
1930ebccf1e3SJoseph Koshy.Tn "Pentium M"
1931ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1932ebccf1e3SJoseph KoshyThe default on
1933ebccf1e3SJoseph Koshy.Tn "Pentium M"
1934ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1935ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
193667edd229SJoseph Koshy.Pq Errata
193767edd229SJoseph KoshyThis event is affected by processor errata E45.
1938ebccf1e3SJoseph Koshy.It Li p6-l2-m-lines-inm
1939ebccf1e3SJoseph KoshyCount the number of modified lines allocated in L2 cache.
1940ebccf1e3SJoseph Koshy.It Li p6-l2-m-lines-outm Op Li ,umask= Ns Ar qualifier
1941ebccf1e3SJoseph KoshyCount the number of L2 M-state lines evicted.
1942ebccf1e3SJoseph Koshy.Pp
1943ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1944ebccf1e3SJoseph KoshyOn these processors an additional qualifier may be specified and
1945ebccf1e3SJoseph Koshycomprises a list of the following keywords separated by
19469abe909bSRuslan Ermilov.Ql +
1947ebccf1e3SJoseph Koshycharacters:
19489abe909bSRuslan Ermilov.Pp
1949ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1950ebccf1e3SJoseph Koshy.It Li both
1951ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1952ebccf1e3SJoseph Koshy.It Li hw
1953ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1954ebccf1e3SJoseph Koshy.It Li nonhw
1955ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1956ebccf1e3SJoseph Koshy.El
19579abe909bSRuslan Ermilov.Pp
1958ebccf1e3SJoseph KoshyThe default is to count both hardware-prefetched and
1959ebccf1e3SJoseph Koshynon-hardware-prefetch operations.
196067edd229SJoseph Koshy.Pq Errata
196167edd229SJoseph KoshyThis event is affected by processor errata E53.
1962ebccf1e3SJoseph Koshy.It Li p6-l2-rqsts Op Li ,umask= Ns Ar qualifier
1963ebccf1e3SJoseph KoshyCount the total number of L2 requests.
1964ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1965ebccf1e3SJoseph Koshykeywords separated by
19669abe909bSRuslan Ermilov.Ql +
1967ebccf1e3SJoseph Koshycharacters:
19689abe909bSRuslan Ermilov.Pp
1969ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1970ebccf1e3SJoseph Koshy.It Li e
1971ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1972ebccf1e3SJoseph Koshy.It Li i
1973ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1974ebccf1e3SJoseph Koshy.It Li m
1975ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1976ebccf1e3SJoseph Koshy.It Li s
1977ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1978ebccf1e3SJoseph Koshy.El
19799abe909bSRuslan Ermilov.Pp
1980ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
1981ebccf1e3SJoseph Koshy.It Li p6-l2-st
1982ebccf1e3SJoseph KoshyCount the number of L2 data stores.
1983ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1984ebccf1e3SJoseph Koshykeywords separated by
19859abe909bSRuslan Ermilov.Ql +
1986ebccf1e3SJoseph Koshycharacters:
19879abe909bSRuslan Ermilov.Pp
1988ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1989ebccf1e3SJoseph Koshy.It Li e
1990ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1991ebccf1e3SJoseph Koshy.It Li i
1992ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1993ebccf1e3SJoseph Koshy.It Li m
1994ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1995ebccf1e3SJoseph Koshy.It Li s
1996ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1997ebccf1e3SJoseph Koshy.El
19989abe909bSRuslan Ermilov.Pp
1999ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
2000ebccf1e3SJoseph Koshy.It Li p6-ld-blocks
2001ebccf1e3SJoseph KoshyCount the number of load operations delayed due to store buffer blocks.
2002ebccf1e3SJoseph Koshy.It Li p6-misalign-mem-ref
2003ebccf1e3SJoseph KoshyCount the number of misaligned data memory references (crossing a 64
2004ebccf1e3SJoseph Koshybit boundary).
2005ebccf1e3SJoseph Koshy.It Li p6-mmx-assist
2006ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2007ebccf1e3SJoseph KoshyCount the number of MMX assists executed.
2008ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-exec
20099abe909bSRuslan Ermilov.Pq Tn Celeron , Tn "Pentium II"
2010ebccf1e3SJoseph KoshyCount the number of MMX instructions executed, except MOVQ and MOVD
2011ebccf1e3SJoseph Koshystores from register to memory.
2012ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-ret
2013ebccf1e3SJoseph Koshy.Pq Tn "Pentium II"
2014ebccf1e3SJoseph KoshyCount the number of MMX instructions retired.
2015ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-type-exec Op Li ,umask= Ns Ar qualifier
2016ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2017ebccf1e3SJoseph KoshyCount the number of MMX instructions executed.
2018ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of
2019ebccf1e3SJoseph Koshythe following keywords separated by
20209abe909bSRuslan Ermilov.Ql +
2021ebccf1e3SJoseph Koshycharacters:
20229abe909bSRuslan Ermilov.Pp
2023ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2024ebccf1e3SJoseph Koshy.It Li pack
2025ebccf1e3SJoseph KoshyCount MMX pack operation instructions.
2026ebccf1e3SJoseph Koshy.It Li packed-arithmetic
2027ebccf1e3SJoseph KoshyCount MMX packed arithmetic instructions.
2028ebccf1e3SJoseph Koshy.It Li packed-logical
2029ebccf1e3SJoseph KoshyCount MMX packed logical instructions.
2030ebccf1e3SJoseph Koshy.It Li packed-multiply
2031ebccf1e3SJoseph KoshyCount MMX packed multiply instructions.
2032ebccf1e3SJoseph Koshy.It Li packed-shift
2033ebccf1e3SJoseph KoshyCount MMX packed shift instructions.
2034ebccf1e3SJoseph Koshy.It Li unpack
2035ebccf1e3SJoseph KoshyCount MMX unpack operation instructions.
2036ebccf1e3SJoseph Koshy.El
20379abe909bSRuslan Ermilov.Pp
2038ebccf1e3SJoseph KoshyThe default is to count all operations.
2039ebccf1e3SJoseph Koshy.It Li p6-mmx-sat-instr-exec
2040ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2041ebccf1e3SJoseph KoshyCount the number of MMX saturating instructions executed.
2042ebccf1e3SJoseph Koshy.It Li p6-mmx-uops-exec
2043ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2044ebccf1e3SJoseph KoshyCount the number of MMX micro-ops executed.
2045ebccf1e3SJoseph Koshy.It Li p6-mul
2046ebccf1e3SJoseph KoshyCount the number of floating point multiplies.
2047ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
2048ebccf1e3SJoseph Koshy.It Li p6-partial-rat-stalls
2049ebccf1e3SJoseph KoshyCount the number of cycles or events for partial stalls.
2050ebccf1e3SJoseph Koshy.It Li p6-resource-stalls
2051ebccf1e3SJoseph KoshyCount the number of cycles there was a resource related stall of any kind.
2052ebccf1e3SJoseph Koshy.It Li p6-ret-seg-renames
2053ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2054ebccf1e3SJoseph KoshyCount the number of segment register rename events retired.
2055ebccf1e3SJoseph Koshy.It Li p6-sb-drains
2056ebccf1e3SJoseph KoshyCount the number of cycles the store buffer is draining.
2057ebccf1e3SJoseph Koshy.It Li p6-seg-reg-renames Op Li ,umask= Ns Ar qualifier
2058ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2059ebccf1e3SJoseph KoshyCount the number of segment register renames.
2060ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises a list of the
2061ebccf1e3SJoseph Koshyfollowing keywords separated by
20629abe909bSRuslan Ermilov.Ql +
2063ebccf1e3SJoseph Koshycharacters:
20649abe909bSRuslan Ermilov.Pp
2065ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2066ebccf1e3SJoseph Koshy.It Li ds
2067ebccf1e3SJoseph KoshyCount renames for segment register DS.
2068ebccf1e3SJoseph Koshy.It Li es
2069ebccf1e3SJoseph KoshyCount renames for segment register ES.
2070ebccf1e3SJoseph Koshy.It Li fs
2071ebccf1e3SJoseph KoshyCount renames for segment register FS.
2072ebccf1e3SJoseph Koshy.It Li gs
2073ebccf1e3SJoseph KoshyCount renames for segment register GS.
2074ebccf1e3SJoseph Koshy.El
20759abe909bSRuslan Ermilov.Pp
2076ebccf1e3SJoseph KoshyThe default is to count operations affecting all segment registers.
2077ebccf1e3SJoseph Koshy.It Li p6-seg-rename-stalls
2078ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2079ebccf1e3SJoseph KoshyCount the number of segment register renaming stalls.
2080ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises a list of the
2081ebccf1e3SJoseph Koshyfollowing keywords separated by
20829abe909bSRuslan Ermilov.Ql +
2083ebccf1e3SJoseph Koshycharacters:
20849abe909bSRuslan Ermilov.Pp
2085ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2086ebccf1e3SJoseph Koshy.It Li ds
2087ebccf1e3SJoseph KoshyCount stalls for segment register DS.
2088ebccf1e3SJoseph Koshy.It Li es
2089ebccf1e3SJoseph KoshyCount stalls for segment register ES.
2090ebccf1e3SJoseph Koshy.It Li fs
2091ebccf1e3SJoseph KoshyCount stalls for segment register FS.
2092ebccf1e3SJoseph Koshy.It Li gs
2093ebccf1e3SJoseph KoshyCount stalls for segment register GS.
2094ebccf1e3SJoseph Koshy.El
20959abe909bSRuslan Ermilov.Pp
2096ebccf1e3SJoseph KoshyThe default is to count operations affecting all the segment registers.
2097ebccf1e3SJoseph Koshy.It Li p6-segment-reg-loads
2098ebccf1e3SJoseph KoshyCount the number of segment register loads.
2099ebccf1e3SJoseph Koshy.It Li p6-uops-retired
2100ebccf1e3SJoseph KoshyCount the number of micro-ops retired.
2101ebccf1e3SJoseph Koshy.El
2102ebccf1e3SJoseph Koshy.Ss Intel P4 PMCS
2103ebccf1e3SJoseph KoshyIntel P4 PMCs are present in Intel
2104ebccf1e3SJoseph Koshy.Tn "Pentium 4"
2105ebccf1e3SJoseph Koshyand
2106ebccf1e3SJoseph Koshy.Tn Xeon
2107ebccf1e3SJoseph Koshyprocessors.
2108ebccf1e3SJoseph KoshyThese PMCs are documented in
2109ebccf1e3SJoseph Koshy.Rs
2110ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
2111ebccf1e3SJoseph Koshy.%T "Volume 3: System Programming Guide"
2112ebccf1e3SJoseph Koshy.%N "Order Number 245472-012"
2113ebccf1e3SJoseph Koshy.%D 2003
2114ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
2115ebccf1e3SJoseph Koshy.Re
2116ebccf1e3SJoseph KoshyFurther information about using these PMCs may be found in
2117ebccf1e3SJoseph Koshy.Rs
2118ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Optimization Guide"
2119ebccf1e3SJoseph Koshy.%D 2003
2120ebccf1e3SJoseph Koshy.%N "Order Number 248966-009"
2121ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
2122ebccf1e3SJoseph Koshy.Re
212367edd229SJoseph KoshySome of these events are affected by processor errata described in
212467edd229SJoseph Koshy.Rs
212567edd229SJoseph Koshy.%B "Intel(R) Pentium(R) 4 Processor Specification Update"
212667edd229SJoseph Koshy.%N "Document Number: 249199-059"
212767edd229SJoseph Koshy.%D "April 2005"
212867edd229SJoseph Koshy.%Q "Intel Corporation"
212967edd229SJoseph Koshy.Re
2130ebccf1e3SJoseph Koshy.Pp
2131ebccf1e3SJoseph KoshyEvent specifiers for Intel P4 PMCs can have the following common
2132ebccf1e3SJoseph Koshyqualifiers:
2133ebccf1e3SJoseph Koshy.Bl -tag -width indent
2134ebccf1e3SJoseph Koshy.It Li active= Ns Ar choice
2135ebccf1e3SJoseph Koshy(On P4 HTT CPUs) Filter event counting based on which logical
2136ebccf1e3SJoseph Koshyprocessors are active.
2137ebccf1e3SJoseph KoshyThe allowed values of
2138ebccf1e3SJoseph Koshy.Ar choice
2139ebccf1e3SJoseph Koshyare:
21409abe909bSRuslan Ermilov.Pp
2141ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2142ebccf1e3SJoseph Koshy.It Li any
2143ebccf1e3SJoseph KoshyCount when either logical processor is active.
2144ebccf1e3SJoseph Koshy.It Li both
2145ebccf1e3SJoseph KoshyCount when both logical processors are active.
2146ebccf1e3SJoseph Koshy.It Li none
2147ebccf1e3SJoseph KoshyCount only when neither logical processor is active.
2148ebccf1e3SJoseph Koshy.It Li single
2149ebccf1e3SJoseph KoshyCount only when one logical processor is active.
2150ebccf1e3SJoseph Koshy.El
21519abe909bSRuslan Ermilov.Pp
2152ebccf1e3SJoseph KoshyThe default is
21539abe909bSRuslan Ermilov.Dq Li both .
2154ebccf1e3SJoseph Koshy.It Li cascade
2155ebccf1e3SJoseph KoshyConfigure the PMC to cascade onto its partner.
2156ebccf1e3SJoseph KoshySee
2157ebccf1e3SJoseph Koshy.Sx "Cascading P4 PMCs"
2158ebccf1e3SJoseph Koshybelow for more information.
2159ebccf1e3SJoseph Koshy.It Li edge
2160ebccf1e3SJoseph KoshyConfigure the counter to count false to true transitions of the threshold
2161ebccf1e3SJoseph Koshycomparision output.
2162ebccf1e3SJoseph KoshyThis qualifier only takes effect if a threshold qualifier has also been
2163ebccf1e3SJoseph Koshyspecified.
2164ebccf1e3SJoseph Koshy.It Li complement
2165ebccf1e3SJoseph KoshyConfigure the counter to increment only when the event count seen is
2166ebccf1e3SJoseph Koshyless than the threshold qualifier value specified.
2167ebccf1e3SJoseph Koshy.It Li mask= Ns Ar qualifier
2168ebccf1e3SJoseph KoshyMany event specifiers for Intel P4 PMCs need to be additionally
2169ebccf1e3SJoseph Koshyqualified using a mask qualifier.
2170ebccf1e3SJoseph KoshyThe allowed syntax for these qualifiers is event specific and is
2171ebccf1e3SJoseph Koshydescribed along with the events.
2172ebccf1e3SJoseph Koshy.It Li os
2173ebccf1e3SJoseph KoshyConfigure the PMC to count when the CPL of the processor is 0.
2174ebccf1e3SJoseph Koshy.It Li precise
2175ebccf1e3SJoseph KoshySelect precise event based sampling.
2176ebccf1e3SJoseph KoshyPrecise sampling is supported by the hardware for a limited set of
2177ebccf1e3SJoseph Koshyevents.
2178ebccf1e3SJoseph Koshy.It Li tag= Ns Ar value
2179ebccf1e3SJoseph KoshyConfigure the PMC to tag the internal uop selected by the other
2180ebccf1e3SJoseph Koshyfields in this event specifier with value
2181ebccf1e3SJoseph Koshy.Ar value .
2182ebccf1e3SJoseph KoshyThis feature is used when cascading PMCs.
2183ebccf1e3SJoseph Koshy.It Li threshold= Ns Ar value
2184ebccf1e3SJoseph KoshyConfigure the PMC to increment only when the event counts seen are
2185ebccf1e3SJoseph Koshygreater than the specified threshold value
2186ebccf1e3SJoseph Koshy.Ar value .
2187ebccf1e3SJoseph Koshy.It Li usr
2188ebccf1e3SJoseph KoshyConfigure the PMC to count when the CPL of the processor is 1, 2 or 3.
2189ebccf1e3SJoseph Koshy.El
21909abe909bSRuslan Ermilov.Pp
2191ebccf1e3SJoseph KoshyIf neither of the
21929abe909bSRuslan Ermilov.Dq Li os
2193ebccf1e3SJoseph Koshyor
21949abe909bSRuslan Ermilov.Dq Li usr
2195ebccf1e3SJoseph Koshyqualifiers are specified, the default is to enable both.
2196ebccf1e3SJoseph Koshy.Pp
2197ebccf1e3SJoseph KoshyOn Intel Pentium 4 processors with HTT, events are
2198ebccf1e3SJoseph Koshydivided into two classes:
21999abe909bSRuslan Ermilov.Pp
22009abe909bSRuslan Ermilov.Bl -tag -width indent -compact
2201ebccf1e3SJoseph Koshy.It "TS Events"
2202ebccf1e3SJoseph Koshyare those where hardware can differentiate between events
2203ebccf1e3SJoseph Koshygenerated on one logical processor from those generated on the
2204ebccf1e3SJoseph Koshyother.
2205ebccf1e3SJoseph Koshy.It "TI Events"
2206ebccf1e3SJoseph Koshyare those where hardware cannot differentiate between events
2207ebccf1e3SJoseph Koshygenerated by multiple logical processors in a package.
2208ebccf1e3SJoseph Koshy.El
22099abe909bSRuslan Ermilov.Pp
2210ebccf1e3SJoseph KoshyOnly TS events are allowed for use with process-mode PMCs on
2211ebccf1e3SJoseph KoshyPentium-4/HTT CPUs.
2212ebccf1e3SJoseph Koshy.Pp
2213ebccf1e3SJoseph KoshyThe event specifiers supported by Intel P4 PMCs are:
22149abe909bSRuslan Ermilov.Pp
2215ebccf1e3SJoseph Koshy.Bl -tag -width indent
2216ebccf1e3SJoseph Koshy.It Li p4-128bit-mmx-uop Op Li ,mask= Ns Ar flags
2217ebccf1e3SJoseph Koshy.Pq "TI event"
2218ebccf1e3SJoseph KoshyCount integer SIMD SSE2 instructions that operate on 128 bit SIMD
2219ebccf1e3SJoseph Koshyoperands.
2220ebccf1e3SJoseph KoshyQualifier
2221ebccf1e3SJoseph Koshy.Ar flags
2222ebccf1e3SJoseph Koshycan take the following value (which is also the default):
22239abe909bSRuslan Ermilov.Pp
2224ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2225ebccf1e3SJoseph Koshy.It Li all
2226ebccf1e3SJoseph KoshyCount all uops operating on 128 bit SIMD integer operands in memory or
2227ebccf1e3SJoseph KoshyXMM register.
2228ebccf1e3SJoseph Koshy.El
22299abe909bSRuslan Ermilov.Pp
2230ebccf1e3SJoseph KoshyIf an instruction contains more than one 128 bit MMX uop, then each
2231ebccf1e3SJoseph Koshyuop will be counted.
2232ebccf1e3SJoseph Koshy.It Li p4-64bit-mmx-uop Op Li ,mask= Ns Ar flags
2233ebccf1e3SJoseph Koshy.Pq "TI event"
2234ebccf1e3SJoseph KoshyCount MMX instructions that operate on 64 bit SIMD operands.
2235ebccf1e3SJoseph KoshyQualifier
2236ebccf1e3SJoseph Koshy.Ar flags
2237ebccf1e3SJoseph Koshycan take the following value (which is also the default):
22389abe909bSRuslan Ermilov.Pp
2239ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2240ebccf1e3SJoseph Koshy.It Li all
2241ebccf1e3SJoseph KoshyCount all uops operating on 64 bit SIMD integer operands in memory or
2242ebccf1e3SJoseph Koshyin MMX registers.
2243ebccf1e3SJoseph Koshy.El
22449abe909bSRuslan Ermilov.Pp
2245ebccf1e3SJoseph KoshyIf an instruction contains more than one 64 bit MMX uop, then each
2246ebccf1e3SJoseph Koshyuop will be counted.
2247ebccf1e3SJoseph Koshy.It Li p4-b2b-cycles
2248ebccf1e3SJoseph Koshy.Pq "TI event"
2249ebccf1e3SJoseph KoshyCount back-to-back bys cycles.
2250ebccf1e3SJoseph KoshyFurther documentation for this event is unavailable.
2251ebccf1e3SJoseph Koshy.It Li p4-bnr
2252ebccf1e3SJoseph Koshy.Pq "TI event"
2253ebccf1e3SJoseph KoshyCount bus-not-ready conditions.
2254ebccf1e3SJoseph KoshyFurther documentation for this event is unavailable.
2255ebccf1e3SJoseph Koshy.It Li p4-bpu-fetch-request Op Li ,mask= Ns Ar qualifier
2256ebccf1e3SJoseph Koshy.Pq "TS event"
2257ebccf1e3SJoseph KoshyCount instruction fetch requests qualified by additional
2258ebccf1e3SJoseph Koshyflags specified in
2259ebccf1e3SJoseph Koshy.Ar qualifier .
2260ebccf1e3SJoseph KoshyAt this point only one flag is supported:
22619abe909bSRuslan Ermilov.Pp
2262ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2263ebccf1e3SJoseph Koshy.It Li tcmiss
2264ebccf1e3SJoseph KoshyCount trace cache lookup misses.
2265ebccf1e3SJoseph Koshy.El
22669abe909bSRuslan Ermilov.Pp
2267ebccf1e3SJoseph KoshyThe default qualifier is also
22689abe909bSRuslan Ermilov.Dq Li mask=tcmiss .
2269ebccf1e3SJoseph Koshy.It Li p4-branch-retired Op Li ,mask= Ns Ar flags
2270ebccf1e3SJoseph Koshy.Pq "TS event"
2271ebccf1e3SJoseph KoshyCounts retired branches.
2272ebccf1e3SJoseph KoshyQualifier
2273ebccf1e3SJoseph Koshy.Ar flags
2274ebccf1e3SJoseph Koshyis a list of the following
22759abe909bSRuslan Ermilov.Ql +
2276ebccf1e3SJoseph Koshyseparated strings:
22779abe909bSRuslan Ermilov.Pp
2278ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2279ebccf1e3SJoseph Koshy.It Li mmnp
2280ebccf1e3SJoseph KoshyCount branches not-taken and predicted.
2281ebccf1e3SJoseph Koshy.It Li mmnm
2282ebccf1e3SJoseph KoshyCount branches not-taken and mis-predicted.
2283ebccf1e3SJoseph Koshy.It Li mmtp
2284ebccf1e3SJoseph KoshyCount branches taken and predicted.
2285ebccf1e3SJoseph Koshy.It Li mmtm
2286ebccf1e3SJoseph KoshyCount branches taken and mis-predicted.
2287ebccf1e3SJoseph Koshy.El
22889abe909bSRuslan Ermilov.Pp
2289ebccf1e3SJoseph KoshyThe default qualifier counts all four kinds of branches.
2290ebccf1e3SJoseph Koshy.It Li p4-bsq-active-entries Op Li ,mask= Ns Ar qualifier
2291ebccf1e3SJoseph Koshy.Pq "TS event"
2292ebccf1e3SJoseph KoshyCount the number of entries (clipped at 15) currently active in the
2293ebccf1e3SJoseph KoshyBSQ.
2294ebccf1e3SJoseph KoshyQualifier
2295ebccf1e3SJoseph Koshy.Ar qualifier
2296ebccf1e3SJoseph Koshyis a
22979abe909bSRuslan Ermilov.Ql +
2298ebccf1e3SJoseph Koshyseparated set of the following flags:
22999abe909bSRuslan Ermilov.Pp
2300ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2301ebccf1e3SJoseph Koshy.It Li req-type0 , Li req-type1
2302ebccf1e3SJoseph KoshyForms a 2-bit number used to select the request type encoding:
23039abe909bSRuslan Ermilov.Pp
2304ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2305ebccf1e3SJoseph Koshy.It Li 0
2306ebccf1e3SJoseph Koshyreads excluding read invalidate
2307ebccf1e3SJoseph Koshy.It Li 1
2308ebccf1e3SJoseph Koshyread invalidates
2309ebccf1e3SJoseph Koshy.It Li 2
2310ebccf1e3SJoseph Koshywrites other than writebacks
2311ebccf1e3SJoseph Koshy.It Li 3
2312ebccf1e3SJoseph Koshywritebacks
2313ebccf1e3SJoseph Koshy.El
23149abe909bSRuslan Ermilov.Pp
2315ebccf1e3SJoseph KoshyBit
23169abe909bSRuslan Ermilov.Dq Li req-type1
2317ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2318ebccf1e3SJoseph Koshy.It Li req-len0 , Li req-len1
2319ebccf1e3SJoseph KoshyForms a two-bit number that specifies the request length encoding:
23209abe909bSRuslan Ermilov.Pp
2321ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2322ebccf1e3SJoseph Koshy.It Li 0
2323ebccf1e3SJoseph Koshy0 chunks
2324ebccf1e3SJoseph Koshy.It Li 1
2325ebccf1e3SJoseph Koshy1 chunk
2326ebccf1e3SJoseph Koshy.It Li 3
2327ebccf1e3SJoseph Koshy8 chunks
2328ebccf1e3SJoseph Koshy.El
23299abe909bSRuslan Ermilov.Pp
2330ebccf1e3SJoseph KoshyBit
23319abe909bSRuslan Ermilov.Dq Li req-len1
2332ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2333ebccf1e3SJoseph Koshy.It Li req-io-type
2334ebccf1e3SJoseph KoshyCount requests that are input or output requests.
2335ebccf1e3SJoseph Koshy.It Li req-lock-type
2336ebccf1e3SJoseph KoshyCount requests that lock the bus.
2337ebccf1e3SJoseph Koshy.It Li req-lock-cache
2338ebccf1e3SJoseph KoshyCount requests that lock the cache.
2339ebccf1e3SJoseph Koshy.It Li req-split-type
2340ebccf1e3SJoseph KoshyCount requests that is a bus 8-byte chunk that is split across an
2341ebccf1e3SJoseph Koshy8-byte boundary.
2342ebccf1e3SJoseph Koshy.It Li req-dem-type
2343ebccf1e3SJoseph KoshyCount requests that are demand (not prefetches) if set.
2344ebccf1e3SJoseph KoshyCount requests that are prefetches if not set.
2345ebccf1e3SJoseph Koshy.It Li req-ord-type
2346ebccf1e3SJoseph KoshyCount requests that are ordered.
2347ebccf1e3SJoseph Koshy.It Li mem-type0 , Li mem-type1 , Li mem-type2
2348ebccf1e3SJoseph KoshyForms a 3-bit number that specifies a memory type encoding:
23499abe909bSRuslan Ermilov.Pp
2350ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2351ebccf1e3SJoseph Koshy.It Li 0
2352ebccf1e3SJoseph KoshyUC
2353ebccf1e3SJoseph Koshy.It Li 1
2354ebccf1e3SJoseph KoshyUSWC
2355ebccf1e3SJoseph Koshy.It Li 4
2356ebccf1e3SJoseph KoshyWT
2357ebccf1e3SJoseph Koshy.It Li 5
2358ebccf1e3SJoseph KoshyWP
2359ebccf1e3SJoseph Koshy.It Li 6
2360ebccf1e3SJoseph KoshyWB
2361ebccf1e3SJoseph Koshy.El
23629abe909bSRuslan Ermilov.Pp
2363ebccf1e3SJoseph KoshyBit
23649abe909bSRuslan Ermilov.Dq Li mem-type2
2365ebccf1e3SJoseph Koshyis the MSB of this 3-bit number.
2366ebccf1e3SJoseph Koshy.El
23679abe909bSRuslan Ermilov.Pp
2368ebccf1e3SJoseph KoshyThe default qualifier has all the above bits set.
2369ebccf1e3SJoseph Koshy.Pp
2370ebccf1e3SJoseph KoshyEdge triggering using the
23719abe909bSRuslan Ermilov.Dq Li edge
2372ebccf1e3SJoseph Koshyqualifier should not be used with this event when counting cycles.
2373ebccf1e3SJoseph Koshy.It Li p4-bsq-allocation Op Li ,mask= Ns Ar qualifier
2374ebccf1e3SJoseph Koshy.Pq "TS event"
2375ebccf1e3SJoseph KoshyCount allocations in the bus sequence unit according to the flags
2376ebccf1e3SJoseph Koshyspecified in
2377ebccf1e3SJoseph Koshy.Ar qualifier ,
2378ebccf1e3SJoseph Koshywhich is a
23799abe909bSRuslan Ermilov.Ql +
2380ebccf1e3SJoseph Koshyseparated set of the following flags:
23819abe909bSRuslan Ermilov.Pp
2382ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2383ebccf1e3SJoseph Koshy.It Li req-type0 , Li req-type1
2384ebccf1e3SJoseph KoshyForms a 2-bit number used to select the request type encoding:
23859abe909bSRuslan Ermilov.Pp
2386ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2387ebccf1e3SJoseph Koshy.It Li 0
2388ebccf1e3SJoseph Koshyreads excluding read invalidate
2389ebccf1e3SJoseph Koshy.It Li 1
2390ebccf1e3SJoseph Koshyread invalidates
2391ebccf1e3SJoseph Koshy.It Li 2
2392ebccf1e3SJoseph Koshywrites other than writebacks
2393ebccf1e3SJoseph Koshy.It Li 3
2394ebccf1e3SJoseph Koshywritebacks
2395ebccf1e3SJoseph Koshy.El
23969abe909bSRuslan Ermilov.Pp
2397ebccf1e3SJoseph KoshyBit
23989abe909bSRuslan Ermilov.Dq Li req-type1
2399ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2400ebccf1e3SJoseph Koshy.It Li req-len0 , Li req-len1
2401ebccf1e3SJoseph KoshyForms a two-bit number that specifies the request length encoding:
24029abe909bSRuslan Ermilov.Pp
2403ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2404ebccf1e3SJoseph Koshy.It Li 0
2405ebccf1e3SJoseph Koshy0 chunks
2406ebccf1e3SJoseph Koshy.It Li 1
2407ebccf1e3SJoseph Koshy1 chunk
2408ebccf1e3SJoseph Koshy.It Li 3
2409ebccf1e3SJoseph Koshy8 chunks
2410ebccf1e3SJoseph Koshy.El
24119abe909bSRuslan Ermilov.Pp
2412ebccf1e3SJoseph KoshyBit
24139abe909bSRuslan Ermilov.Dq Li req-len1
2414ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2415ebccf1e3SJoseph Koshy.It Li req-io-type
2416ebccf1e3SJoseph KoshyCount requests that are input or output requests.
2417ebccf1e3SJoseph Koshy.It Li req-lock-type
2418ebccf1e3SJoseph KoshyCount requests that lock the bus.
2419ebccf1e3SJoseph Koshy.It Li req-lock-cache
2420ebccf1e3SJoseph KoshyCount requests that lock the cache.
2421ebccf1e3SJoseph Koshy.It Li req-split-type
2422ebccf1e3SJoseph KoshyCount requests that is a bus 8-byte chunk that is split across an
2423ebccf1e3SJoseph Koshy8-byte boundary.
2424ebccf1e3SJoseph Koshy.It Li req-dem-type
2425ebccf1e3SJoseph KoshyCount requests that are demand (not prefetches) if set.
2426ebccf1e3SJoseph KoshyCount requests that are prefetches if not set.
2427ebccf1e3SJoseph Koshy.It Li req-ord-type
2428ebccf1e3SJoseph KoshyCount requests that are ordered.
2429ebccf1e3SJoseph Koshy.It Li mem-type0 , Li mem-type1 , Li mem-type2
2430ebccf1e3SJoseph KoshyForms a 3-bit number that specifies a memory type encoding:
24319abe909bSRuslan Ermilov.Pp
2432ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2433ebccf1e3SJoseph Koshy.It Li 0
2434ebccf1e3SJoseph KoshyUC
2435ebccf1e3SJoseph Koshy.It Li 1
2436ebccf1e3SJoseph KoshyUSWC
2437ebccf1e3SJoseph Koshy.It Li 4
2438ebccf1e3SJoseph KoshyWT
2439ebccf1e3SJoseph Koshy.It Li 5
2440ebccf1e3SJoseph KoshyWP
2441ebccf1e3SJoseph Koshy.It Li 6
2442ebccf1e3SJoseph KoshyWB
2443ebccf1e3SJoseph Koshy.El
24449abe909bSRuslan Ermilov.Pp
2445ebccf1e3SJoseph KoshyBit
24469abe909bSRuslan Ermilov.Dq Li mem-type2
2447ebccf1e3SJoseph Koshyis the MSB of this 3-bit number.
2448ebccf1e3SJoseph Koshy.El
24499abe909bSRuslan Ermilov.Pp
2450ebccf1e3SJoseph KoshyThe default qualifier has all the above bits set.
2451ebccf1e3SJoseph Koshy.Pp
2452ebccf1e3SJoseph KoshyThis event is usually used along with the
24539abe909bSRuslan Ermilov.Dq Li edge
2454ebccf1e3SJoseph Koshyqualifier to avoid multiple counting.
2455ebccf1e3SJoseph Koshy.It Li p4-bsq-cache-reference Op Li ,mask= Ns Ar qualifier
2456ebccf1e3SJoseph Koshy.Pq "TS event"
2457ebccf1e3SJoseph KoshyCount cache references as seen by the bus unit (2nd or 3rd level
2458ebccf1e3SJoseph Koshycache references).
2459ebccf1e3SJoseph KoshyQualifier
2460ebccf1e3SJoseph Koshy.Ar qualifier
2461ebccf1e3SJoseph Koshyis a
24629abe909bSRuslan Ermilov.Ql +
2463ebccf1e3SJoseph Koshyseparated list of the following keywords:
24649abe909bSRuslan Ermilov.Pp
2465ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2466ebccf1e3SJoseph Koshy.It Li rd-2ndl-hits
2467ebccf1e3SJoseph KoshyCount 2nd level cache hits in the shared state.
2468ebccf1e3SJoseph Koshy.It Li rd-2ndl-hite
2469ebccf1e3SJoseph KoshyCount 2nd level cache hits in the exclusive state.
2470ebccf1e3SJoseph Koshy.It Li rd-2ndl-hitm
2471ebccf1e3SJoseph KoshyCount 2nd level cache hits in the modified state.
2472ebccf1e3SJoseph Koshy.It Li rd-3rdl-hits
2473ebccf1e3SJoseph KoshyCount 3rd level cache hits in the shared state.
2474ebccf1e3SJoseph Koshy.It Li rd-3rdl-hite
2475ebccf1e3SJoseph KoshyCount 3rd level cache hits in the exclusive state.
2476ebccf1e3SJoseph Koshy.It Li rd-3rdl-hitm
2477ebccf1e3SJoseph KoshyCount 3rd level cache hits in the modified state.
2478ebccf1e3SJoseph Koshy.It Li rd-2ndl-miss
2479ebccf1e3SJoseph KoshyCount 2nd level cache misses.
2480ebccf1e3SJoseph Koshy.It Li rd-3rdl-miss
2481ebccf1e3SJoseph KoshyCount 3rd level cache misses.
2482ebccf1e3SJoseph Koshy.It Li wr-2ndl-miss
2483ebccf1e3SJoseph KoshyCount write-back lookups from the data access cache that miss the 2nd
2484ebccf1e3SJoseph Koshylevel cache.
2485ebccf1e3SJoseph Koshy.El
24869abe909bSRuslan Ermilov.Pp
2487ebccf1e3SJoseph KoshyThe default is to count all the above events.
2488ebccf1e3SJoseph Koshy.It Li p4-execution-event Op Li ,mask= Ns Ar flags
2489ebccf1e3SJoseph Koshy.Pq "TS event"
2490ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the execution
2491ebccf1e3SJoseph Koshytagging mechanism.
2492ebccf1e3SJoseph KoshyQualifier
2493ebccf1e3SJoseph Koshy.Ar flags
2494ebccf1e3SJoseph Koshycan contain the following strings separated by
24959abe909bSRuslan Ermilov.Ql +
2496ebccf1e3SJoseph Koshycharacters:
24979abe909bSRuslan Ermilov.Pp
2498ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2499ebccf1e3SJoseph Koshy.It Li nbogus0 , Li nbogus1 , Li nbogus2 , Li nbogus3
2500ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2501ebccf1e3SJoseph Koshy.It Li bogus0 , Li bogus1 , Li bogus2 , Li bogus3
2502ebccf1e3SJoseph KoshyThe marked uops are bogus.
2503ebccf1e3SJoseph Koshy.El
25049abe909bSRuslan Ermilov.Pp
2505ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2506ebccf1e3SJoseph Koshyperform the desired uop tagging.
2507ebccf1e3SJoseph KoshyThe default is to set all the above flags.
2508ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2509ebccf1e3SJoseph Koshy.It Li p4-front-end-event Op Li ,mask= Ns Ar flags
2510ebccf1e3SJoseph Koshy.Pq "TS event"
2511ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the front-end
2512ebccf1e3SJoseph Koshytagging mechanism.
2513ebccf1e3SJoseph KoshyQualifier
2514ebccf1e3SJoseph Koshy.Ar flags
2515ebccf1e3SJoseph Koshycan contain the following strings separated by
25169abe909bSRuslan Ermilov.Ql +
2517ebccf1e3SJoseph Koshycharacters:
25189abe909bSRuslan Ermilov.Pp
2519ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2520ebccf1e3SJoseph Koshy.It Li nbogus
2521ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2522ebccf1e3SJoseph Koshy.It Li bogus
2523ebccf1e3SJoseph KoshyThe marked uops are bogus.
2524ebccf1e3SJoseph Koshy.El
25259abe909bSRuslan Ermilov.Pp
2526ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2527ebccf1e3SJoseph Koshyperform the desired uop tagging.
2528ebccf1e3SJoseph KoshyThe default is to select both kinds of events.
2529ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2530ebccf1e3SJoseph Koshy.It Li p4-fsb-data-activity Op Li ,mask= Ns Ar flags
2531ebccf1e3SJoseph Koshy.Pq "TI event"
2532ebccf1e3SJoseph KoshyCount each DBSY or DRDY event selected by qualifier
2533ebccf1e3SJoseph Koshy.Ar flags .
2534ebccf1e3SJoseph KoshyQualifier
2535ebccf1e3SJoseph Koshy.Ar flags
2536ebccf1e3SJoseph Koshyis a
25379abe909bSRuslan Ermilov.Ql +
2538ebccf1e3SJoseph Koshyseparated set of the following flags:
25399abe909bSRuslan Ermilov.Pp
2540ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2541ebccf1e3SJoseph Koshy.It Li drdy-drv
2542ebccf1e3SJoseph KoshyCount when this processor is driving data onto the bus.
2543ebccf1e3SJoseph Koshy.It Li drdy-own
2544ebccf1e3SJoseph KoshyCount when this processor is reading data from the bus.
2545ebccf1e3SJoseph Koshy.It Li drdy-other
2546ebccf1e3SJoseph KoshyCount when data is on the bus but not being sampled by this processor.
2547ebccf1e3SJoseph Koshy.It Li dbsy-drv
2548ebccf1e3SJoseph KoshyCount when this processor reserves the bus for use in the next cycle
2549ebccf1e3SJoseph Koshyin order to drive data.
2550ebccf1e3SJoseph Koshy.It Li dbsy-own
2551ebccf1e3SJoseph KoshyCount when some agent reserves the bus for use in the next bus cycle
2552ebccf1e3SJoseph Koshyto drive data that this processor will sample.
2553ebccf1e3SJoseph Koshy.It Li dbsy-other
2554ebccf1e3SJoseph KoshyCount when some agent reserves the bus for use in the next bus cycle
2555ebccf1e3SJoseph Koshyto drive data that this processor will not sample.
2556ebccf1e3SJoseph Koshy.El
25579abe909bSRuslan Ermilov.Pp
2558ebccf1e3SJoseph KoshyFlags
25599abe909bSRuslan Ermilov.Dq Li drdy-own
2560ebccf1e3SJoseph Koshyand
25619abe909bSRuslan Ermilov.Dq Li drdy-other
2562ebccf1e3SJoseph Koshyare mutually exclusive.
2563ebccf1e3SJoseph KoshyFlags
25649abe909bSRuslan Ermilov.Dq Li dbsy-own
2565ebccf1e3SJoseph Koshyand
25669abe909bSRuslan Ermilov.Dq Li dbsy-other
2567ebccf1e3SJoseph Koshyare mutually exclusive.
2568ebccf1e3SJoseph KoshyThe default value for
2569ebccf1e3SJoseph Koshy.Ar qualifier
2570ebccf1e3SJoseph Koshyis
25719abe909bSRuslan Ermilov.Dq Li drdy-drv+drdy-own+dbsy-drv+dbsy-own .
2572ebccf1e3SJoseph Koshy.It Li p4-global-power-events Op Li ,mask= Ns Ar flags
2573ebccf1e3SJoseph Koshy.Pq "TS event"
2574ebccf1e3SJoseph KoshyCount cycles during which the processor is not stopped.
2575ebccf1e3SJoseph KoshyQualifier
2576ebccf1e3SJoseph Koshy.Ar flags
2577ebccf1e3SJoseph Koshycan take the following value (which is also the default):
25789abe909bSRuslan Ermilov.Pp
2579ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2580ebccf1e3SJoseph Koshy.It Li running
2581ebccf1e3SJoseph KoshyCount cycles when the processor is active.
2582ebccf1e3SJoseph Koshy.El
25839abe909bSRuslan Ermilov.Pp
2584ebccf1e3SJoseph Koshy.It Li p4-instr-retired Op Li ,mask= Ns Ar flags
2585ebccf1e3SJoseph Koshy.Pq "TS event"
2586ebccf1e3SJoseph KoshyCount instructions retired during a clock cycle.
2587ebccf1e3SJoseph KoshyQualifer
2588ebccf1e3SJoseph Koshy.Ar flags
2589ebccf1e3SJoseph Koshycomprises of the following strings separated by
25909abe909bSRuslan Ermilov.Ql +
2591ebccf1e3SJoseph Koshycharacters:
25929abe909bSRuslan Ermilov.Pp
2593ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2594ebccf1e3SJoseph Koshy.It Li nbogusntag
2595ebccf1e3SJoseph KoshyCount non-bogus instructions that are not tagged.
2596ebccf1e3SJoseph Koshy.It Li nbogustag
2597ebccf1e3SJoseph KoshyCount non-bogus instructions that are tagged.
2598ebccf1e3SJoseph Koshy.It Li bogusntag
2599ebccf1e3SJoseph KoshyCount bogus instructions that are not tagged.
2600ebccf1e3SJoseph Koshy.It Li bogustag
2601ebccf1e3SJoseph KoshyCount bogus instructions that are tagged.
2602ebccf1e3SJoseph Koshy.El
26039abe909bSRuslan Ermilov.Pp
2604ebccf1e3SJoseph KoshyThe default qualifier counts all the above kinds of instructions.
2605ebccf1e3SJoseph Koshy.It Li p4-ioq-active-entries Xo
2606ebccf1e3SJoseph Koshy.Op Li ,mask= Ns Ar qualifier
2607ebccf1e3SJoseph Koshy.Op Li ,busreqtype= Ns Ar req-type
2608ebccf1e3SJoseph Koshy.Xc
2609ebccf1e3SJoseph Koshy.Pq "TS event"
2610ebccf1e3SJoseph KoshyCount the number of entries (clipped at 15) in the IOQ that are
2611ebccf1e3SJoseph Koshyactive.
2612ebccf1e3SJoseph KoshyThe event masks are specified by qualifier
2613ebccf1e3SJoseph Koshy.Ar qualifier
2614ebccf1e3SJoseph Koshyand
2615ebccf1e3SJoseph Koshy.Ar req-type .
2616ebccf1e3SJoseph Koshy.Pp
2617ebccf1e3SJoseph KoshyQualifier
2618ebccf1e3SJoseph Koshy.Ar qualifier
2619ebccf1e3SJoseph Koshyis a
26209abe909bSRuslan Ermilov.Ql +
2621ebccf1e3SJoseph Koshyseparated set of the following flags:
26229abe909bSRuslan Ermilov.Pp
2623ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2624ebccf1e3SJoseph Koshy.It Li all-read
2625ebccf1e3SJoseph KoshyCount read entries.
2626ebccf1e3SJoseph Koshy.It Li all-write
2627ebccf1e3SJoseph KoshyCount write entries.
2628ebccf1e3SJoseph Koshy.It Li mem-uc
2629ebccf1e3SJoseph KoshyCount entries accessing uncacheable memory.
2630ebccf1e3SJoseph Koshy.It Li mem-wc
2631ebccf1e3SJoseph KoshyCount entries accessing write-combining memory.
2632ebccf1e3SJoseph Koshy.It Li mem-wt
2633ebccf1e3SJoseph KoshyCount entries accessing write-through memory.
2634ebccf1e3SJoseph Koshy.It Li mem-wp
2635ebccf1e3SJoseph KoshyCount entries accessing write-protected memory
2636ebccf1e3SJoseph Koshy.It Li mem-wb
2637ebccf1e3SJoseph KoshyCount entries accessing write-back memory.
2638ebccf1e3SJoseph Koshy.It Li own
2639ebccf1e3SJoseph KoshyCount store requests driven by the processor (i.e., not by other
2640ebccf1e3SJoseph Koshyprocessors or by DMA).
2641ebccf1e3SJoseph Koshy.It Li other
2642ebccf1e3SJoseph KoshyCount store requests driven by other processors or by DMA.
2643ebccf1e3SJoseph Koshy.It Li prefetch
2644ebccf1e3SJoseph KoshyInclude hardware and software prefetch requests in the count.
2645ebccf1e3SJoseph Koshy.El
26469abe909bSRuslan Ermilov.Pp
2647ebccf1e3SJoseph KoshyThe default value for
2648ebccf1e3SJoseph Koshy.Ar qualifier
2649ebccf1e3SJoseph Koshyis to enable all the above flags.
2650ebccf1e3SJoseph Koshy.Pp
2651ebccf1e3SJoseph KoshyThe
2652ebccf1e3SJoseph Koshy.Ar req-type
2653ebccf1e3SJoseph Koshyqualifier is a 5-bit number can be additionally used to select a
2654ebccf1e3SJoseph Koshyspecific bus request type.
2655ebccf1e3SJoseph KoshyThe default is 0.
2656ebccf1e3SJoseph Koshy.Pp
2657ebccf1e3SJoseph KoshyThe
26589abe909bSRuslan Ermilov.Dq Li edge
2659ebccf1e3SJoseph Koshyqualifier should not be used when counting cycles with this event.
2660ebccf1e3SJoseph KoshyThe exact behaviour of this event depends on the processor revision.
2661ebccf1e3SJoseph Koshy.It Li p4-ioq-allocation Xo
2662ebccf1e3SJoseph Koshy.Op Li ,mask= Ns Ar qualifier
2663ebccf1e3SJoseph Koshy.Op Li ,busreqtype= Ns Ar req-type
2664ebccf1e3SJoseph Koshy.Xc
2665ebccf1e3SJoseph Koshy.Pq "TS event"
2666ebccf1e3SJoseph KoshyCount various types of transactions on the bus matching the flags set
2667ebccf1e3SJoseph Koshyin
2668ebccf1e3SJoseph Koshy.Ar qualifier
2669ebccf1e3SJoseph Koshyand
2670ebccf1e3SJoseph Koshy.Ar req-type .
2671ebccf1e3SJoseph Koshy.Pp
2672ebccf1e3SJoseph KoshyQualifier
2673ebccf1e3SJoseph Koshy.Ar qualifier
2674ebccf1e3SJoseph Koshyis a
26759abe909bSRuslan Ermilov.Ql +
2676ebccf1e3SJoseph Koshyseparated set of the following flags:
26779abe909bSRuslan Ermilov.Pp
2678ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2679ebccf1e3SJoseph Koshy.It Li all-read
2680ebccf1e3SJoseph KoshyCount read entries.
2681ebccf1e3SJoseph Koshy.It Li all-write
2682ebccf1e3SJoseph KoshyCount write entries.
2683ebccf1e3SJoseph Koshy.It Li mem-uc
2684ebccf1e3SJoseph KoshyCount entries accessing uncacheable memory.
2685ebccf1e3SJoseph Koshy.It Li mem-wc
2686ebccf1e3SJoseph KoshyCount entries accessing write-combining memory.
2687ebccf1e3SJoseph Koshy.It Li mem-wt
2688ebccf1e3SJoseph KoshyCount entries accessing write-through memory.
2689ebccf1e3SJoseph Koshy.It Li mem-wp
2690ebccf1e3SJoseph KoshyCount entries accessing write-protected memory
2691ebccf1e3SJoseph Koshy.It Li mem-wb
2692ebccf1e3SJoseph KoshyCount entries accessing write-back memory.
2693ebccf1e3SJoseph Koshy.It Li own
2694ebccf1e3SJoseph KoshyCount store requests driven by the processor (i.e., not by other
2695ebccf1e3SJoseph Koshyprocessors or by DMA).
2696ebccf1e3SJoseph Koshy.It Li other
2697ebccf1e3SJoseph KoshyCount store requests driven by other processors or by DMA.
2698ebccf1e3SJoseph Koshy.It Li prefetch
2699ebccf1e3SJoseph KoshyInclude hardware and software prefetch requests in the count.
2700ebccf1e3SJoseph Koshy.El
27019abe909bSRuslan Ermilov.Pp
2702ebccf1e3SJoseph KoshyThe default value for
2703ebccf1e3SJoseph Koshy.Ar qualifier
2704ebccf1e3SJoseph Koshyis to enable all the above flags.
2705ebccf1e3SJoseph Koshy.Pp
2706ebccf1e3SJoseph KoshyThe
2707ebccf1e3SJoseph Koshy.Ar req-type
2708ebccf1e3SJoseph Koshyqualifier is a 5-bit number can be additionally used to select a
2709ebccf1e3SJoseph Koshyspecific bus request type.
2710ebccf1e3SJoseph KoshyThe default is 0.
2711ebccf1e3SJoseph Koshy.Pp
2712ebccf1e3SJoseph KoshyThe
27139abe909bSRuslan Ermilov.Dq Li edge
2714ebccf1e3SJoseph Koshyqualifier is normally used with this event to prevent multiple
2715ebccf1e3SJoseph Koshycounting.
2716ebccf1e3SJoseph KoshyThe exact behaviour of this event depends on the processor revision.
2717ebccf1e3SJoseph Koshy.It Li p4-itlb-reference Op mask= Ns Ar qualifier
2718ebccf1e3SJoseph Koshy.Pq "TS event"
2719ebccf1e3SJoseph KoshyCount translations using the intruction translation look-aside
2720ebccf1e3SJoseph Koshybuffer.
2721ebccf1e3SJoseph KoshyThe
2722ebccf1e3SJoseph Koshy.Ar qualifier
2723ebccf1e3SJoseph Koshyargument is a list of the following strings separated by
27249abe909bSRuslan Ermilov.Ql +
2725ebccf1e3SJoseph Koshycharacters.
27269abe909bSRuslan Ermilov.Pp
2727ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2728ebccf1e3SJoseph Koshy.It Li hit
2729ebccf1e3SJoseph KoshyCount ITLB hits.
2730ebccf1e3SJoseph Koshy.It Li miss
2731ebccf1e3SJoseph KoshyCount ITLB misses.
2732ebccf1e3SJoseph Koshy.It Li hit-uc
2733ebccf1e3SJoseph KoshyCount uncacheable ITLB hits.
2734ebccf1e3SJoseph Koshy.El
27359abe909bSRuslan Ermilov.Pp
2736ebccf1e3SJoseph KoshyIf no
2737ebccf1e3SJoseph Koshy.Ar qualifier
2738ebccf1e3SJoseph Koshyis specified the default is to count all the three kinds of ITLB
2739ebccf1e3SJoseph Koshytranslations.
2740ebccf1e3SJoseph Koshy.It Li p4-load-port-replay Op Li ,mask= Ns Ar qualifier
2741ebccf1e3SJoseph Koshy.Pq "TS event"
2742ebccf1e3SJoseph KoshyCount replayed events at the load port.
2743ebccf1e3SJoseph KoshyQualifier
2744ebccf1e3SJoseph Koshy.Ar qualifier
2745ebccf1e3SJoseph Koshycan take on one value:
27469abe909bSRuslan Ermilov.Pp
2747ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2748ebccf1e3SJoseph Koshy.It Li split-ld
2749ebccf1e3SJoseph KoshyCount split loads.
2750ebccf1e3SJoseph Koshy.El
27519abe909bSRuslan Ermilov.Pp
2752ebccf1e3SJoseph KoshyThe default value for
2753ebccf1e3SJoseph Koshy.Ar qualifier
2754ebccf1e3SJoseph Koshyis
27559abe909bSRuslan Ermilov.Dq Li split-ld .
2756ebccf1e3SJoseph Koshy.It Li p4-mispred-branch-retired Op Li ,mask= Ns Ar flags
2757ebccf1e3SJoseph Koshy.Pq "TS event"
2758ebccf1e3SJoseph KoshyCount mispredicted IA-32 branch instructions.
2759ebccf1e3SJoseph KoshyQualifier
2760ebccf1e3SJoseph Koshy.Ar flags
2761ebccf1e3SJoseph Koshycan take the following value (which is also the default):
27629abe909bSRuslan Ermilov.Pp
2763ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2764ebccf1e3SJoseph Koshy.It Li nbogus
2765ebccf1e3SJoseph KoshyCount non-bogus retired branch instructions.
2766ebccf1e3SJoseph Koshy.El
2767ebccf1e3SJoseph Koshy.It Li p4-machine-clear Op Li ,mask= Ns Ar flags
2768ebccf1e3SJoseph Koshy.Pq "TS event"
2769ebccf1e3SJoseph KoshyCount the number of pipeline clears seen by the processor.
2770ebccf1e3SJoseph KoshyQualifer
2771ebccf1e3SJoseph Koshy.Ar flags
2772ebccf1e3SJoseph Koshyis a list of the following strings separated by
27739abe909bSRuslan Ermilov.Ql +
2774ebccf1e3SJoseph Koshycharacters:
27759abe909bSRuslan Ermilov.Pp
2776ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2777ebccf1e3SJoseph Koshy.It Li clear
2778ebccf1e3SJoseph KoshyCount for a portion of the many cycles when the machine is being
2779ebccf1e3SJoseph Koshycleared for any reason.
2780ebccf1e3SJoseph Koshy.It Li moclear
2781ebccf1e3SJoseph KoshyCount machine clears due to memory ordering issues.
2782ebccf1e3SJoseph Koshy.It Li smclear
2783ebccf1e3SJoseph KoshyCount machine clears due to self-modifying code.
2784ebccf1e3SJoseph Koshy.El
27859abe909bSRuslan Ermilov.Pp
2786ebccf1e3SJoseph KoshyUse qualifier
27879abe909bSRuslan Ermilov.Dq Li edge
2788ebccf1e3SJoseph Koshyto get a count of occurrences of machine clears.
2789ebccf1e3SJoseph KoshyThe default qualifier is
27909abe909bSRuslan Ermilov.Dq Li clear .
2791ebccf1e3SJoseph Koshy.It Li p4-memory-cancel Op Li ,mask= Ns Ar event-list
2792ebccf1e3SJoseph Koshy.Pq "TS event"
2793ebccf1e3SJoseph KoshyCount the cancelling of various kinds of requests in the data cache
2794ebccf1e3SJoseph Koshyaddress control unit of the CPU.
2795ebccf1e3SJoseph KoshyThe qualifier
2796ebccf1e3SJoseph Koshy.Ar event-list
2797ebccf1e3SJoseph Koshyis a list of the following strings separated by
27989abe909bSRuslan Ermilov.Ql +
2799ebccf1e3SJoseph Koshycharacters:
28009abe909bSRuslan Ermilov.Pp
2801ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2802ebccf1e3SJoseph Koshy.It Li st-rb-full
2803ebccf1e3SJoseph KoshyRequests cancelled because no store request buffer was available.
2804ebccf1e3SJoseph Koshy.It Li 64k-conf
2805ebccf1e3SJoseph KoshyRequests that conflict due to 64K aliasing.
2806ebccf1e3SJoseph Koshy.El
28079abe909bSRuslan Ermilov.Pp
2808ebccf1e3SJoseph KoshyIf
2809ebccf1e3SJoseph Koshy.Ar event-list
2810ebccf1e3SJoseph Koshyis not specified, then the default is to count both kinds of events.
2811ebccf1e3SJoseph Koshy.It Li p4-memory-complete Op Li ,mask= Ns Ar event-list
2812ebccf1e3SJoseph Koshy.Pq "TS event"
2813ebccf1e3SJoseph KoshyCount the completion of load split, store split, uncacheable split and
2814ebccf1e3SJoseph Koshyuncacheable load operations selected by qualifier
2815ebccf1e3SJoseph Koshy.Ar event-list .
2816ebccf1e3SJoseph KoshyThe qualifier
2817ebccf1e3SJoseph Koshy.Ar event-list
2818ebccf1e3SJoseph Koshyis a
28199abe909bSRuslan Ermilov.Ql +
2820ebccf1e3SJoseph Koshyseparated list of the following flags:
28219abe909bSRuslan Ermilov.Pp
2822ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2823ebccf1e3SJoseph Koshy.It Li lsc
2824ebccf1e3SJoseph KoshyCount load splits completed, excluding loads from uncacheable or
2825ebccf1e3SJoseph Koshywrite-combining areas.
2826ebccf1e3SJoseph Koshy.It Li ssc
2827ebccf1e3SJoseph KoshyCount any split stores completed.
2828ebccf1e3SJoseph Koshy.El
28299abe909bSRuslan Ermilov.Pp
2830ebccf1e3SJoseph KoshyThe default is to count both kinds of operations.
2831ebccf1e3SJoseph Koshy.It Li p4-mob-load-replay Op Li ,mask= Ns Ar qualifier
2832ebccf1e3SJoseph Koshy.Pq "TS event"
2833ebccf1e3SJoseph KoshyCount load replays triggered by the memory order buffer.
2834ebccf1e3SJoseph KoshyQualifier
2835ebccf1e3SJoseph Koshy.Ar qualifier
2836ebccf1e3SJoseph Koshycan be a
28379abe909bSRuslan Ermilov.Ql +
2838ebccf1e3SJoseph Koshyseparated list of the following flags:
28399abe909bSRuslan Ermilov.Pp
2840ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2841ebccf1e3SJoseph Koshy.It Li no-sta
2842ebccf1e3SJoseph KoshyCount replays because of unknown store addresses.
2843ebccf1e3SJoseph Koshy.It Li no-std
2844ebccf1e3SJoseph KoshyCount replays because of unknown store data.
2845ebccf1e3SJoseph Koshy.It Li partial-data
2846ebccf1e3SJoseph KoshyCount replays because of partially overlapped data accesses between
2847ebccf1e3SJoseph Koshyload and store operations.
2848ebccf1e3SJoseph Koshy.It Li unalgn-addr
2849ebccf1e3SJoseph KoshyCount replays because of mismatches in the lower 4 bits of load and
2850ebccf1e3SJoseph Koshystore operations.
2851ebccf1e3SJoseph Koshy.El
28529abe909bSRuslan Ermilov.Pp
2853ebccf1e3SJoseph KoshyThe default qualifier is
2854ebccf1e3SJoseph Koshy.Ar no-sta+no-std+partial-data+unalgn-addr .
2855ebccf1e3SJoseph Koshy.It Li p4-packed-dp-uop Op Li ,mask= Ns Ar flags
2856ebccf1e3SJoseph Koshy.Pq "TI event"
2857ebccf1e3SJoseph KoshyCount packed double-precision uops.
2858ebccf1e3SJoseph KoshyQualifier
2859ebccf1e3SJoseph Koshy.Ar flags
2860ebccf1e3SJoseph Koshycan take the following value (which is also the default):
28619abe909bSRuslan Ermilov.Pp
2862ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2863ebccf1e3SJoseph Koshy.It Li all
2864ebccf1e3SJoseph KoshyCount all uops operating on packed double-precision operands.
2865ebccf1e3SJoseph Koshy.El
2866ebccf1e3SJoseph Koshy.It Li p4-packed-sp-uop Op Li ,mask= Ns Ar flags
2867ebccf1e3SJoseph Koshy.Pq "TI event"
2868ebccf1e3SJoseph KoshyCount packed single-precision uops.
2869ebccf1e3SJoseph KoshyQualifier
2870ebccf1e3SJoseph Koshy.Ar flags
2871ebccf1e3SJoseph Koshycan take the following value (which is also the default):
28729abe909bSRuslan Ermilov.Pp
2873ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2874ebccf1e3SJoseph Koshy.It Li all
2875ebccf1e3SJoseph KoshyCount all uops operating on packed single-precision operands.
2876ebccf1e3SJoseph Koshy.El
2877ebccf1e3SJoseph Koshy.It Li p4-page-walk-type Op Li ,mask= Ns Ar qualifier
2878ebccf1e3SJoseph Koshy.Pq "TI event"
2879ebccf1e3SJoseph KoshyCount page walks performed by the page miss handler.
2880ebccf1e3SJoseph KoshyQualifier
2881ebccf1e3SJoseph Koshy.Ar qualifier
2882ebccf1e3SJoseph Koshycan be a
28839abe909bSRuslan Ermilov.Ql +
2884ebccf1e3SJoseph Koshyseparated list of the following keywords:
28859abe909bSRuslan Ermilov.Pp
2886ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2887ebccf1e3SJoseph Koshy.It Li dtmiss
2888ebccf1e3SJoseph KoshyCount page walks for data TLB misses.
2889ebccf1e3SJoseph Koshy.It Li itmiss
2890ebccf1e3SJoseph KoshyCount page walks for instruction TLB misses.
2891ebccf1e3SJoseph Koshy.El
28929abe909bSRuslan Ermilov.Pp
2893ebccf1e3SJoseph KoshyThe default value for
2894ebccf1e3SJoseph Koshy.Ar qualifier
2895ebccf1e3SJoseph Koshyis
28969abe909bSRuslan Ermilov.Dq Li dtmiss+itmiss .
2897ebccf1e3SJoseph Koshy.It Li p4-replay-event Op Li ,mask= Ns Ar flags
2898ebccf1e3SJoseph Koshy.Pq "TS event"
2899ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the replay
2900ebccf1e3SJoseph Koshytagging mechanism.
2901ebccf1e3SJoseph KoshyQualifier
2902ebccf1e3SJoseph Koshy.Ar flags
2903ebccf1e3SJoseph Koshycontains a
29049abe909bSRuslan Ermilov.Ql +
2905ebccf1e3SJoseph Koshyseparated set of the following strings:
29069abe909bSRuslan Ermilov.Pp
2907ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2908ebccf1e3SJoseph Koshy.It Li nbogus
2909ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2910ebccf1e3SJoseph Koshy.It Li bogus
2911ebccf1e3SJoseph KoshyThe marked uops are bogus.
2912ebccf1e3SJoseph Koshy.El
29139abe909bSRuslan Ermilov.Pp
2914ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2915ebccf1e3SJoseph Koshyperform the desired uop tagging.
2916ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
2917ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2918ebccf1e3SJoseph Koshy.It Li p4-resource-stall Op Li ,mask= Ns Ar flags
2919ebccf1e3SJoseph Koshy.Pq "TS event"
2920ebccf1e3SJoseph KoshyCount the occurrence or latency of stalls in the allocator.
2921ebccf1e3SJoseph KoshyQualifier
2922ebccf1e3SJoseph Koshy.Ar flags
2923ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29249abe909bSRuslan Ermilov.Pp
2925ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2926ebccf1e3SJoseph Koshy.It Li sbfull
2927ebccf1e3SJoseph KoshyA stall due to the lack of store buffers.
2928ebccf1e3SJoseph Koshy.El
2929ebccf1e3SJoseph Koshy.It Li p4-response
2930ebccf1e3SJoseph Koshy.Pq "TI event"
2931ebccf1e3SJoseph KoshyCount different types of responses.
2932ebccf1e3SJoseph KoshyFurther documentation on this event is not available.
2933ebccf1e3SJoseph Koshy.It Li p4-retired-branch-type Op Li ,mask= Ns Ar flags
2934ebccf1e3SJoseph Koshy.Pq "TS event"
2935ebccf1e3SJoseph KoshyCount branches retired.
2936ebccf1e3SJoseph KoshyQualifier
2937ebccf1e3SJoseph Koshy.Ar flags
2938ebccf1e3SJoseph Koshycontains a
29399abe909bSRuslan Ermilov.Ql +
2940ebccf1e3SJoseph Koshyseparated list of strings:
29419abe909bSRuslan Ermilov.Pp
2942ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2943ebccf1e3SJoseph Koshy.It Li conditional
2944ebccf1e3SJoseph KoshyCount conditional jumps.
2945ebccf1e3SJoseph Koshy.It Li call
2946ebccf1e3SJoseph KoshyCount direct and indirect call branches.
2947ebccf1e3SJoseph Koshy.It Li return
2948ebccf1e3SJoseph KoshyCount return branches.
2949ebccf1e3SJoseph Koshy.It Li indirect
2950ebccf1e3SJoseph KoshyCount returns, indirect calls or indirect jumps.
2951ebccf1e3SJoseph Koshy.El
29529abe909bSRuslan Ermilov.Pp
2953ebccf1e3SJoseph KoshyThe default qualifier counts all the above branch types.
2954ebccf1e3SJoseph Koshy.It Li p4-retired-mispred-branch-type Op Li ,mask= Ns Ar flags
2955ebccf1e3SJoseph Koshy.Pq "TS event"
2956ebccf1e3SJoseph KoshyCount mispredicted branches retired.
2957ebccf1e3SJoseph KoshyQualifier
2958ebccf1e3SJoseph Koshy.Ar flags
2959ebccf1e3SJoseph Koshycontains a
29609abe909bSRuslan Ermilov.Ql +
2961ebccf1e3SJoseph Koshyseparated list of strings:
29629abe909bSRuslan Ermilov.Pp
2963ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2964ebccf1e3SJoseph Koshy.It Li conditional
2965ebccf1e3SJoseph KoshyCount conditional jumps.
2966ebccf1e3SJoseph Koshy.It Li call
2967ebccf1e3SJoseph KoshyCount indirect call branches.
2968ebccf1e3SJoseph Koshy.It Li return
2969ebccf1e3SJoseph KoshyCount return branches.
2970ebccf1e3SJoseph Koshy.It Li indirect
2971ebccf1e3SJoseph KoshyCount returns, indirect calls or indirect jumps.
2972ebccf1e3SJoseph Koshy.El
29739abe909bSRuslan Ermilov.Pp
2974ebccf1e3SJoseph KoshyThe default qualifier counts all the above branch types.
2975ebccf1e3SJoseph Koshy.It Li p4-scalar-dp-uop Op Li ,mask= Ns Ar flags
2976ebccf1e3SJoseph Koshy.Pq "TI event"
2977ebccf1e3SJoseph KoshyCount the number of scalar double-precision uops.
2978ebccf1e3SJoseph KoshyQualifier
2979ebccf1e3SJoseph Koshy.Ar flags
2980ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29819abe909bSRuslan Ermilov.Pp
2982ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2983ebccf1e3SJoseph Koshy.It Li all
2984ebccf1e3SJoseph KoshyCount the number of scalar double-precision uops.
2985ebccf1e3SJoseph Koshy.El
2986ebccf1e3SJoseph Koshy.It Li p4-scalar-sp-uop Op Li ,mask= Ns Ar flags
2987ebccf1e3SJoseph Koshy.Pq "TI event"
2988ebccf1e3SJoseph KoshyCount the number of scalar single-precision uops.
2989ebccf1e3SJoseph KoshyQualifier
2990ebccf1e3SJoseph Koshy.Ar flags
2991ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29929abe909bSRuslan Ermilov.Pp
2993ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2994ebccf1e3SJoseph Koshy.It Li all
2995ebccf1e3SJoseph KoshyCount all uops operating on scalar single-precision operands.
2996ebccf1e3SJoseph Koshy.El
2997ebccf1e3SJoseph Koshy.It Li p4-snoop
2998ebccf1e3SJoseph Koshy.Pq "TI event"
2999ebccf1e3SJoseph KoshyCount snoop traffic.
3000ebccf1e3SJoseph KoshyFurther documentation on this event is not available.
3001ebccf1e3SJoseph Koshy.It Li p4-sse-input-assist Op Li ,mask= Ns Ar flags
3002ebccf1e3SJoseph Koshy.Pq "TI event"
3003ebccf1e3SJoseph KoshyCount the number of times an assist is required to handle problems
3004ebccf1e3SJoseph Koshywith the operands for SSE and SSE2 operations.
3005ebccf1e3SJoseph KoshyQualifier
3006ebccf1e3SJoseph Koshy.Ar flags
3007ebccf1e3SJoseph Koshycan take the following value (which is also the default):
30089abe909bSRuslan Ermilov.Pp
3009ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3010ebccf1e3SJoseph Koshy.It Li all
3011ebccf1e3SJoseph KoshyCount assists for all SSE and SSE2 uops.
3012ebccf1e3SJoseph Koshy.El
3013ebccf1e3SJoseph Koshy.It Li p4-store-port-replay Op Li ,mask= Ns Ar qualifier
3014ebccf1e3SJoseph Koshy.Pq "TS event"
3015ebccf1e3SJoseph KoshyCount events replayed at the store port.
3016ebccf1e3SJoseph KoshyQualifier
3017ebccf1e3SJoseph Koshy.Ar qualifier
3018ebccf1e3SJoseph Koshycan take on one value:
30199abe909bSRuslan Ermilov.Pp
3020ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3021ebccf1e3SJoseph Koshy.It Li split-st
3022ebccf1e3SJoseph KoshyCount split stores.
3023ebccf1e3SJoseph Koshy.El
30249abe909bSRuslan Ermilov.Pp
3025ebccf1e3SJoseph KoshyThe default value for
3026ebccf1e3SJoseph Koshy.Ar qualifier
3027ebccf1e3SJoseph Koshyis
30289abe909bSRuslan Ermilov.Dq Li split-st .
3029ebccf1e3SJoseph Koshy.It Li p4-tc-deliver-mode Op Li ,mask= Ns Ar qualifier
3030ebccf1e3SJoseph Koshy.Pq "TI event"
3031ebccf1e3SJoseph KoshyCount the duration in cycles of operating modes of the trace cache and
3032ebccf1e3SJoseph Koshydecode engine.
3033ebccf1e3SJoseph KoshyThe desired operating mode is selected by
3034ebccf1e3SJoseph Koshy.Ar qualifier ,
3035ebccf1e3SJoseph Koshywhich is a list of the following strings separated by
30369abe909bSRuslan Ermilov.Ql +
3037ebccf1e3SJoseph Koshycharacters:
30389abe909bSRuslan Ermilov.Pp
3039ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3040ebccf1e3SJoseph Koshy.It Li DD
3041ebccf1e3SJoseph KoshyBoth logical processors are in deliver mode.
3042ebccf1e3SJoseph Koshy.It Li DB
3043ebccf1e3SJoseph KoshyLogical processor 0 is in deliver mode while logical processor 1 is in
3044ebccf1e3SJoseph Koshybuild mode.
3045ebccf1e3SJoseph Koshy.It Li DI
3046ebccf1e3SJoseph KoshyLogical processor 0 is in deliver mode while logical processor 1 is
3047ebccf1e3SJoseph Koshyhalted, or in machine clear, or transitioning to a long microcode
3048ebccf1e3SJoseph Koshyflow.
3049ebccf1e3SJoseph Koshy.It Li BD
3050ebccf1e3SJoseph KoshyLogical processor 0 is in build mode while logical processor 1 is in
3051ebccf1e3SJoseph Koshydeliver mode.
3052ebccf1e3SJoseph Koshy.It Li BB
3053ebccf1e3SJoseph KoshyBoth logical processors are in build mode.
3054ebccf1e3SJoseph Koshy.It Li BI
3055ebccf1e3SJoseph KoshyLogical processor 0 is in build mode while logical processor 1 is
3056ebccf1e3SJoseph Koshyhalted, or in machine clear or transitioning to a long microcode
3057ebccf1e3SJoseph Koshyflow.
3058ebccf1e3SJoseph Koshy.It Li ID
3059ebccf1e3SJoseph KoshyLogical processor 0 is halted, or in machine clear or transitioning to
3060ebccf1e3SJoseph Koshya long microcode flow while logical processor 1 is in deliver mode.
3061ebccf1e3SJoseph Koshy.It Li IB
3062ebccf1e3SJoseph KoshyLogical processor 0 is halted, or in machine clear or transitioning to
3063ebccf1e3SJoseph Koshya long microcode flow while logical processor 1 is in build mode.
3064ebccf1e3SJoseph Koshy.El
30659abe909bSRuslan Ermilov.Pp
3066ebccf1e3SJoseph KoshyIf there is only one logical processor in the processor package then
3067ebccf1e3SJoseph Koshythe qualifier for logical processor 1 is ignored.
3068ebccf1e3SJoseph KoshyIf no qualifier is specified, the default qualifier is
30699abe909bSRuslan Ermilov.Dq Li DD+DB+DI+BD+BB+BI+ID+IB .
3070ebccf1e3SJoseph Koshy.It Li p4-tc-ms-xfer Op Li ,mask= Ns Ar flags
3071ebccf1e3SJoseph Koshy.Pq "TI event"
3072ebccf1e3SJoseph KoshyCount the number of times uop delivery changed from the trace cache to
3073ebccf1e3SJoseph KoshyMS ROM.
3074ebccf1e3SJoseph KoshyQualifier
3075ebccf1e3SJoseph Koshy.Ar flags
3076ebccf1e3SJoseph Koshycan take the following value (which is also the default):
30779abe909bSRuslan Ermilov.Pp
3078ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3079ebccf1e3SJoseph Koshy.It Li cisc
3080ebccf1e3SJoseph KoshyCount TC to MS transfers.
3081ebccf1e3SJoseph Koshy.El
3082ebccf1e3SJoseph Koshy.It Li p4-uop-queue-writes Op Li ,mask= Ns Ar flags
3083ebccf1e3SJoseph Koshy.Pq "TS event"
3084ebccf1e3SJoseph KoshyCount the number of valid uops written to the uop queue.
3085ebccf1e3SJoseph KoshyQualifier
3086ebccf1e3SJoseph Koshy.Ar flags
3087ebccf1e3SJoseph Koshyis a list of the following strings, separated by
30889abe909bSRuslan Ermilov.Ql +
3089ebccf1e3SJoseph Koshycharacters:
30909abe909bSRuslan Ermilov.Pp
3091ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3092ebccf1e3SJoseph Koshy.It Li from-tc-build
3093ebccf1e3SJoseph KoshyCount uops being written from the trace cache in build mode.
3094ebccf1e3SJoseph Koshy.It Li from-tc-deliver
3095ebccf1e3SJoseph KoshyCount uops being written from the trace cache in deliver mode.
3096ebccf1e3SJoseph Koshy.It Li from-rom
3097ebccf1e3SJoseph KoshyCount uops being written from microcode ROM.
3098ebccf1e3SJoseph Koshy.El
30999abe909bSRuslan Ermilov.Pp
3100ebccf1e3SJoseph KoshyThe default qualifier counts all the above kinds of uops.
3101ebccf1e3SJoseph Koshy.It Li p4-uop-type Op Li ,mask= Ns Ar flags
3102ebccf1e3SJoseph Koshy.Pq "TS event"
3103ebccf1e3SJoseph KoshyThis event is used in conjunction with the front-end at-retirement
3104ebccf1e3SJoseph Koshymechanism to tag load and store uops.
3105ebccf1e3SJoseph KoshyQualifer
3106ebccf1e3SJoseph Koshy.Ar flags
3107ebccf1e3SJoseph Koshycomprises the following strings separated by
31089abe909bSRuslan Ermilov.Ql +
3109ebccf1e3SJoseph Koshycharacters:
31109abe909bSRuslan Ermilov.Pp
3111ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3112ebccf1e3SJoseph Koshy.It Li tagloads
3113ebccf1e3SJoseph KoshyMark uops that are load operations.
3114ebccf1e3SJoseph Koshy.It Li tagstores
3115ebccf1e3SJoseph KoshyMark uops that are store operations.
3116ebccf1e3SJoseph Koshy.El
31179abe909bSRuslan Ermilov.Pp
3118ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
3119ebccf1e3SJoseph Koshy.It Li p4-uops-retired Op Li ,mask= Ns Ar flags
3120ebccf1e3SJoseph Koshy.Pq "TS event"
3121ebccf1e3SJoseph KoshyCount uops retired during a clock cycle.
3122ebccf1e3SJoseph KoshyQualifier
3123ebccf1e3SJoseph Koshy.Ar flags
3124ebccf1e3SJoseph Koshycomprises the following strings separated by
31259abe909bSRuslan Ermilov.Ql +
3126ebccf1e3SJoseph Koshycharacters:
31279abe909bSRuslan Ermilov.Pp
3128ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3129ebccf1e3SJoseph Koshy.It Li nbogus
3130ebccf1e3SJoseph KoshyCount marked uops that are not bogus.
3131ebccf1e3SJoseph Koshy.It Li bogus
3132ebccf1e3SJoseph KoshyCount marked uops that are bogus.
3133ebccf1e3SJoseph Koshy.El
31349abe909bSRuslan Ermilov.Pp
3135ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
3136ebccf1e3SJoseph Koshy.It Li p4-wc-buffer Op Li ,mask= Ns Ar flags
3137ebccf1e3SJoseph Koshy.Pq "TI event"
3138ebccf1e3SJoseph KoshyCount write-combining buffer operations.
3139ebccf1e3SJoseph KoshyQualifier
3140ebccf1e3SJoseph Koshy.Ar flags
3141ebccf1e3SJoseph Koshycontains the following strings separated by
31429abe909bSRuslan Ermilov.Ql +
3143ebccf1e3SJoseph Koshycharacters:
31449abe909bSRuslan Ermilov.Pp
3145ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3146ebccf1e3SJoseph Koshy.It Li wcb-evicts
3147ebccf1e3SJoseph KoshyWC buffer evictions due to any cause.
3148ebccf1e3SJoseph Koshy.It Li wcb-full-evict
3149ebccf1e3SJoseph KoshyWC buffer evictions due to no WC buffer being available.
3150ebccf1e3SJoseph Koshy.El
31519abe909bSRuslan Ermilov.Pp
3152ebccf1e3SJoseph KoshyThe default qualifer counts both kinds of evictions.
3153ebccf1e3SJoseph Koshy.It Li p4-x87-assist Op Li ,mask= Ns Ar flags
3154ebccf1e3SJoseph Koshy.Pq "TS event"
3155ebccf1e3SJoseph KoshyCount the retirement of x87 instructions that required special
3156ebccf1e3SJoseph Koshyhandling.
3157ebccf1e3SJoseph KoshyQualifier
3158ebccf1e3SJoseph Koshy.Ar flags
3159ebccf1e3SJoseph Koshycontains the following strings separated by
31609abe909bSRuslan Ermilov.Ql +
3161ebccf1e3SJoseph Koshycharacters:
31629abe909bSRuslan Ermilov.Pp
3163ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3164ebccf1e3SJoseph Koshy.It Li fpsu
3165ebccf1e3SJoseph KoshyCount instructions that saw an FP stack underflow.
3166ebccf1e3SJoseph Koshy.It Li fpso
3167ebccf1e3SJoseph KoshyCount instructions that saw an FP stack overflow.
3168ebccf1e3SJoseph Koshy.It Li poao
3169ebccf1e3SJoseph KoshyCount instructions that saw an x87 output overflow.
3170ebccf1e3SJoseph Koshy.It Li poau
3171ebccf1e3SJoseph KoshyCount instructions that saw an x87 output underflow.
3172ebccf1e3SJoseph Koshy.It Li prea
3173ebccf1e3SJoseph KoshyCount instructions that needed an x87 input assist.
3174ebccf1e3SJoseph Koshy.El
31759abe909bSRuslan Ermilov.Pp
3176ebccf1e3SJoseph KoshyThe default qualifier counts all the above types of instruction
3177ebccf1e3SJoseph Koshyretirements.
3178ebccf1e3SJoseph Koshy.It Li p4-x87-fp-uop Op Li ,mask= Ns Ar flags
3179ebccf1e3SJoseph Koshy.Pq "TI event"
3180ebccf1e3SJoseph KoshyCount x87 floating-point uops.
3181ebccf1e3SJoseph KoshyQualifier
3182ebccf1e3SJoseph Koshy.Ar flags
3183ebccf1e3SJoseph Koshycan take the following value (which is also the default):
31849abe909bSRuslan Ermilov.Pp
3185ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3186ebccf1e3SJoseph Koshy.It Li all
3187ebccf1e3SJoseph KoshyCount all x87 floating-point uops.
3188ebccf1e3SJoseph Koshy.El
31899abe909bSRuslan Ermilov.Pp
3190ebccf1e3SJoseph KoshyIf an instruction contains more than one x87 floating-point uops, then
3191ebccf1e3SJoseph Koshyall x87 floating-point uops will be counted.
3192ebccf1e3SJoseph KoshyThis event does not count x87 floating-point data movement operations.
3193ebccf1e3SJoseph Koshy.It Li p4-x87-simd-moves-uop Op Li ,mask= Ns Ar flags
3194ebccf1e3SJoseph Koshy.Pq "TI event"
3195ebccf1e3SJoseph KoshyCount each x87 FPU, MMX, SSE, or SSE2 uops that load data or store
3196ebccf1e3SJoseph Koshydata or perform register-to-register moves.
3197ebccf1e3SJoseph KoshyThis event does not count integer move uops.
3198ebccf1e3SJoseph KoshyQualifier
3199ebccf1e3SJoseph Koshy.Ar flags
3200ebccf1e3SJoseph Koshymay contain the following keywords separated by
32019abe909bSRuslan Ermilov.Ql +
3202ebccf1e3SJoseph Koshycharacters:
32039abe909bSRuslan Ermilov.Pp
3204ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3205ebccf1e3SJoseph Koshy.It Li allp0
3206ebccf1e3SJoseph KoshyCount all x87 and SIMD store and move uops.
3207ebccf1e3SJoseph Koshy.It Li allp2
3208ebccf1e3SJoseph KoshyCount all x87 and SIMD load uops.
3209ebccf1e3SJoseph Koshy.El
32109abe909bSRuslan Ermilov.Pp
3211ebccf1e3SJoseph KoshyThe default is to count all uops.
321267edd229SJoseph Koshy.Pq Errata
321367edd229SJoseph KoshyThis event may be affected by processor errata N43.
3214ebccf1e3SJoseph Koshy.El
3215ebccf1e3SJoseph Koshy.Ss "Cascading P4 PMCs"
32169abe909bSRuslan ErmilovPMC cascading support is currently poorly implemented.
32179abe909bSRuslan ErmilovWhile individual event counters may be allocated with a
32189abe909bSRuslan Ermilov.Dq Li cascade
32199abe909bSRuslan Ermilovqualifier, the current API does not offer the ability
32209abe909bSRuslan Ermilovto name and allocate all the resources needed for a
32219abe909bSRuslan Ermilovcascaded event counter pair in a single operation.
3222ebccf1e3SJoseph Koshy.Ss "Precise Event Based Sampling"
32239abe909bSRuslan ErmilovSupport for precise event based sampling is currently
32249abe909bSRuslan Ermilovunimplemented in
32259abe909bSRuslan Ermilov.Xr hwpmc 4 .
3226ebccf1e3SJoseph Koshy.Sh IMPLEMENTATION NOTES
3227ebccf1e3SJoseph KoshyOn the i386 architecture,
3228ebccf1e3SJoseph Koshy.Fx
3229ebccf1e3SJoseph Koshyhas historically allowed the use of the RDTSC instruction from
3230ebccf1e3SJoseph Koshyuser-mode (i.e., at a processor CPL of 3) by any process.
3231ebccf1e3SJoseph KoshyThis behaviour is preserved by
3232ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
3233ebccf1e3SJoseph Koshy.Sh RETURN VALUES
3234ebccf1e3SJoseph KoshyThe
3235ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability ,
3236ebccf1e3SJoseph Koshy.Fn pmc_name_of_class ,
3237ebccf1e3SJoseph Koshy.Fn pmc_name_of_cputype ,
3238ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition ,
3239ebccf1e3SJoseph Koshy.Fn pmc_name_of_event ,
3240ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode ,
3241ebccf1e3SJoseph Koshyand
3242ebccf1e3SJoseph Koshy.Fn pmc_name_of_state
3243ebccf1e3SJoseph Koshyfunctions return a pointer to the human readable form of their argument.
3244ebccf1e3SJoseph KoshyThese pointers may point to statically allocated storage and must
3245ebccf1e3SJoseph Koshynot be passed to
3246ebccf1e3SJoseph Koshy.Fn free .
3247ebccf1e3SJoseph KoshyIn case of an error, these functions return
32489abe909bSRuslan Ermilov.Dv NULL
3249ebccf1e3SJoseph Koshyand set the global variable
3250ebccf1e3SJoseph Koshy.Va errno .
3251ebccf1e3SJoseph Koshy.Pp
3252ebccf1e3SJoseph KoshyThe functions
3253ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3254ebccf1e3SJoseph Koshyand
3255ebccf1e3SJoseph Koshy.Fn pmc_npmc
3256ebccf1e3SJoseph Koshyreturn the number of CPUs and number of PMCs configured respectively;
3257ebccf1e3SJoseph Koshyin case of an error they return the value
32589abe909bSRuslan Ermilov\-1
3259ebccf1e3SJoseph Koshyand set the global variable
3260ebccf1e3SJoseph Koshy.Va errno .
3261ebccf1e3SJoseph Koshy.Pp
3262ebccf1e3SJoseph KoshyAll other functions return the value
32639abe909bSRuslan Ermilov0
3264ebccf1e3SJoseph Koshyif successful; otherwise the value
32659abe909bSRuslan Ermilov\-1
3266ebccf1e3SJoseph Koshyis returned and the global variable
3267ebccf1e3SJoseph Koshy.Va errno
3268ebccf1e3SJoseph Koshyis set to indicate the error.
32695138c36aSJoseph Koshy.Sh COMPATIBILITY
32705138c36aSJoseph KoshyThe interface between the
3271110e1704SRuslan Ermilov.Nm pmc
32725138c36aSJoseph Koshylibrary and the
32735138c36aSJoseph Koshy.Xr hwpmc 4
32745138c36aSJoseph Koshydriver is intended to be private to the implementation and may
32755138c36aSJoseph Koshychange.
32765138c36aSJoseph KoshyIn order to ease forward compatibility with future versions of the
32775138c36aSJoseph Koshy.Xr hwpmc 4
32785138c36aSJoseph Koshydriver, applications are urged to dynamically link with the
3279110e1704SRuslan Ermilov.Nm pmc
32805138c36aSJoseph Koshylibrary.
32815138c36aSJoseph Koshy.Pp
32825138c36aSJoseph KoshyThe
3283110e1704SRuslan Ermilov.Nm pmc
32845138c36aSJoseph KoshyAPI is
32855138c36aSJoseph Koshy.Ud
3286ebccf1e3SJoseph Koshy.Sh ERRORS
3287ebccf1e3SJoseph KoshyA call to
3288ebccf1e3SJoseph Koshy.Fn pmc_init
3289ebccf1e3SJoseph Koshymay fail with the following errors in addition to those returned by
3290ebccf1e3SJoseph Koshy.Xr modfind 2 ,
3291ebccf1e3SJoseph Koshy.Xr modstat 2
3292ebccf1e3SJoseph Koshyand
3293ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3294ebccf1e3SJoseph Koshy.Bl -tag -width Er
3295ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3296ebccf1e3SJoseph KoshyAn unknown CPU type was encountered during initialization.
3297ebccf1e3SJoseph Koshy.It Bq Er EPROGMISMATCH
3298ebccf1e3SJoseph KoshyThe version number of the
3299ebccf1e3SJoseph Koshy.Xr hwpmc 4
3300ebccf1e3SJoseph Koshykernel module did not match that compiled into the
3301110e1704SRuslan Ermilov.Nm pmc
3302ebccf1e3SJoseph Koshylibrary.
3303ebccf1e3SJoseph Koshy.El
3304ebccf1e3SJoseph Koshy.Pp
3305ebccf1e3SJoseph KoshyA call to
3306c5153e19SJoseph Koshy.Fn pmc_capabilities ,
3307ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability ,
3308ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition ,
3309ebccf1e3SJoseph Koshy.Fn pmc_name_of_state ,
3310ebccf1e3SJoseph Koshy.Fn pmc_name_of_event ,
3311ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode
3312ebccf1e3SJoseph Koshy.Fn pmc_name_of_class
3313c5153e19SJoseph Koshyand
3314c5153e19SJoseph Koshy.Fn pmc_width
3315ebccf1e3SJoseph Koshymay fail with the following error:
3316ebccf1e3SJoseph Koshy.Bl -tag -width Er
3317ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3318ebccf1e3SJoseph KoshyAn invalid argument was passed to the function.
3319ebccf1e3SJoseph Koshy.El
3320ebccf1e3SJoseph Koshy.Pp
3321ebccf1e3SJoseph KoshyA call to
3322ebccf1e3SJoseph Koshy.Fn pmc_cpuinfo
3323ebccf1e3SJoseph Koshyor
3324ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3325ebccf1e3SJoseph Koshymay fail with the following error:
3326ebccf1e3SJoseph Koshy.Bl -tag -width Er
3327ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3328ebccf1e3SJoseph KoshyThe
3329110e1704SRuslan Ermilov.Nm pmc
3330ebccf1e3SJoseph Koshyhas not been initialized.
3331ebccf1e3SJoseph Koshy.El
3332ebccf1e3SJoseph Koshy.Pp
3333ebccf1e3SJoseph KoshyA call to
3334ebccf1e3SJoseph Koshy.Fn pmc_npmc
3335ebccf1e3SJoseph Koshymay fail with the following errors:
3336ebccf1e3SJoseph Koshy.Bl -tag -width Er
3337ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3338ebccf1e3SJoseph KoshyThe argument passed in was out of range.
3339ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3340ebccf1e3SJoseph KoshyThe
3341110e1704SRuslan Ermilov.Nm pmc
3342ebccf1e3SJoseph Koshylibrary has not been initialized.
3343ebccf1e3SJoseph Koshy.El
3344ebccf1e3SJoseph Koshy.Pp
3345ebccf1e3SJoseph KoshyA call to
3346ebccf1e3SJoseph Koshy.Fn pmc_pmcinfo
3347ebccf1e3SJoseph Koshymay fail with the following errors, in addition to those returned by
3348ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3349ebccf1e3SJoseph Koshy.Bl -tag -width Er
3350ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3351ebccf1e3SJoseph KoshyThe
3352110e1704SRuslan Ermilov.Nm pmc
3353ebccf1e3SJoseph Koshylibrary is not yet initialized.
3354ebccf1e3SJoseph Koshy.El
3355ebccf1e3SJoseph Koshy.Pp
3356ebccf1e3SJoseph KoshyA call to
3357ebccf1e3SJoseph Koshy.Fn pmc_allocate
3358ebccf1e3SJoseph Koshymay fail with the following errors, in addition to those returned by
3359ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3360ebccf1e3SJoseph Koshy.Bl -tag -width Er
3361ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3362ebccf1e3SJoseph KoshyThe
3363ebccf1e3SJoseph Koshy.Fa mode
3364ebccf1e3SJoseph Koshyargument passed in had an illegal value, or the event specification
3365ebccf1e3SJoseph Koshy.Fa ctrspec
33669abe909bSRuslan Ermilovwas unrecognized for this CPU type.
3367ebccf1e3SJoseph Koshy.El
3368ebccf1e3SJoseph Koshy.Pp
3369ebccf1e3SJoseph KoshyCalls to
3370ebccf1e3SJoseph Koshy.Fn pmc_attach ,
3371f263522aSJoseph Koshy.Fn pmc_configure_logfile ,
3372ebccf1e3SJoseph Koshy.Fn pmc_detach ,
3373f263522aSJoseph Koshy.Fn pmc_disable ,
3374f263522aSJoseph Koshy.Fn pmc_enable ,
3375f263522aSJoseph Koshy.Fn pmc_get_driver_stats ,
3376f263522aSJoseph Koshy.Fn pmc_get_msr ,
3377ebccf1e3SJoseph Koshy.Fn pmc_read ,
3378f263522aSJoseph Koshy.Fn pmc_release ,
3379ebccf1e3SJoseph Koshy.Fn pmc_rw ,
3380ebccf1e3SJoseph Koshy.Fn pmc_set ,
3381f263522aSJoseph Koshy.Fn pmc_start ,
3382f263522aSJoseph Koshy.Fn pmc_stop ,
3383f263522aSJoseph Koshy.Fn pmc_write ,
3384ebccf1e3SJoseph Koshyand
3385f263522aSJoseph Koshy.Fn pmc_writelog
3386ebccf1e3SJoseph Koshymay fail with the errors described in
3387ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
3388f263522aSJoseph Koshy.Pp
3389f263522aSJoseph KoshyIf a log file was configured using
3390f263522aSJoseph Koshy.Fn pmc_configure_logfile
3391f263522aSJoseph Koshyand the
3392f263522aSJoseph Koshy.Xr hwpmc 4
3393f263522aSJoseph Koshydriver encountered an error while logging data to it, then
3394f263522aSJoseph Koshylogging will be stopped and a subsequent call to
3395f263522aSJoseph Koshy.Fn pmc_flush_logfile
3396f263522aSJoseph Koshywill fail with the error code seen by the
3397f263522aSJoseph Koshy.Xr hwpmc 4
3398f263522aSJoseph Koshydriver.
3399ebccf1e3SJoseph Koshy.Sh SEE ALSO
3400ebccf1e3SJoseph Koshy.Xr modfind 2 ,
3401ebccf1e3SJoseph Koshy.Xr modstat 2 ,
3402f263522aSJoseph Koshy.Xr calloc 3 ,
3403f263522aSJoseph Koshy.Xr pmclog 3 ,
3404ebccf1e3SJoseph Koshy.Xr hwpmc 4 ,
3405ebccf1e3SJoseph Koshy.Xr pmccontrol 8 ,
3406ebccf1e3SJoseph Koshy.Xr pmcstat 8
34075138c36aSJoseph Koshy.Sh HISTORY
34085138c36aSJoseph KoshyThe
3409110e1704SRuslan Ermilov.Nm pmc
34105138c36aSJoseph Koshylibrary first appeared in
34115138c36aSJoseph Koshy.Fx 6.0 .
3412ebccf1e3SJoseph Koshy.Sh BUGS
3413ebccf1e3SJoseph KoshyThe information returned by
3414ebccf1e3SJoseph Koshy.Fn pmc_cpuinfo ,
3415ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3416ebccf1e3SJoseph Koshyand possibly
3417ebccf1e3SJoseph Koshy.Fn pmc_npmc
3418ebccf1e3SJoseph Koshyshould really be available all the time, through a better designed
3419f263522aSJoseph Koshyinterface and not just when
3420ebccf1e3SJoseph Koshy.Xr hwpmc 4
3421f263522aSJoseph Koshyis present in the kernel.
3422