xref: /freebsd/lib/libpmc/pmc.3 (revision 110e1704d33d8632ce8febdd36a0143ca8b2ef0e)
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"
71ebccf1e3SJoseph Koshy.Fa "uint32_t 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
85ebccf1e3SJoseph Koshy.Fn pmc_disable "uint32_t cpu" "int pmc"
86ebccf1e3SJoseph Koshy.Ft int
87ebccf1e3SJoseph Koshy.Fn pmc_enable "uint32_t 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
119ebccf1e3SJoseph Koshy.Fn pmc_npmc "uint32_t cpu"
120ebccf1e3SJoseph Koshy.Ft int
121f263522aSJoseph Koshy.Fn pmc_pmcinfo "uint32_t 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.
457ebccf1e3SJoseph Koshy.El
458ebccf1e3SJoseph Koshy.Ss Time Stamp Counter (TSC)
4599abe909bSRuslan ErmilovThe timestamp counter is a monotonically non-decreasing counter that
460ebccf1e3SJoseph Koshycounts processor cycles.
461ebccf1e3SJoseph Koshy.Pp
4629abe909bSRuslan ErmilovIn the i386 architecture, this counter may
463ebccf1e3SJoseph Koshybe selected by requesting an event with event specifier
4649abe909bSRuslan Ermilov.Dq Li tsc .
465ebccf1e3SJoseph KoshyThe
4669abe909bSRuslan Ermilov.Dq Li tsc
467ebccf1e3SJoseph Koshyevent does not support any further qualifiers.
468ebccf1e3SJoseph KoshyIt can only be allocated in system-wide counting mode,
469ebccf1e3SJoseph Koshyand is a read-only counter.
470ebccf1e3SJoseph KoshyMultiple processes are allowed to allocate the TSC.
471ebccf1e3SJoseph KoshyOnce allocated, it may be read using the
472ebccf1e3SJoseph Koshy.Fn pmc_read
473ebccf1e3SJoseph Koshyfunction, or by using the RDTSC instruction.
474ebccf1e3SJoseph Koshy.Ss AMD (K7) PMCs
475ebccf1e3SJoseph KoshyThese PMCs are present in the
476ebccf1e3SJoseph Koshy.Tn "AMD Athlon"
477ebccf1e3SJoseph Koshyseries of CPUs and are documented in:
478ebccf1e3SJoseph Koshy.Rs
479ebccf1e3SJoseph Koshy.%B "AMD Athlon Processor x86 Code Optimization Guide"
480ebccf1e3SJoseph Koshy.%N "Publication No. 22007"
481ebccf1e3SJoseph Koshy.%D "February 2002"
4829abe909bSRuslan Ermilov.%Q "Advanced Micro Devices, Inc."
483ebccf1e3SJoseph Koshy.Re
484ebccf1e3SJoseph Koshy.Pp
485ebccf1e3SJoseph KoshyEvent specifiers for AMD K7 PMCs can have the following optional
486ebccf1e3SJoseph Koshyqualifiers:
487ebccf1e3SJoseph Koshy.Bl -tag -width indent
488ebccf1e3SJoseph Koshy.It Li count= Ns Ar value
489ebccf1e3SJoseph KoshyConfigure the counter to increment only if the number of configured
490ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
491ebccf1e3SJoseph Koshy.Ar value .
492ebccf1e3SJoseph Koshy.It Li edge
493ebccf1e3SJoseph KoshyConfigure the counter to only count negated-to-asserted transitions
494ebccf1e3SJoseph Koshyof the conditions expressed by the other qualifiers.
495ebccf1e3SJoseph KoshyIn other words, the counter will increment only once whenever a given
496ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
497ebccf1e3SJoseph Koshywhich the condition remains true.
498ebccf1e3SJoseph Koshy.It Li inv
499ebccf1e3SJoseph KoshyInvert the sense of comparision when the
5009abe909bSRuslan Ermilov.Dq Li count
501ebccf1e3SJoseph Koshyqualifier is present, making the counter to increment when the
502ebccf1e3SJoseph Koshynumber of events per cycle is less than the value specified by
503ebccf1e3SJoseph Koshythe
5049abe909bSRuslan Ermilov.Dq Li count
505ebccf1e3SJoseph Koshyqualifier.
506ebccf1e3SJoseph Koshy.It Li os
507ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at privilege level 0.
508ebccf1e3SJoseph Koshy.It Li unitmask= Ns Ar mask
509ebccf1e3SJoseph KoshyThis qualifier is used to further qualify a select few events,
5109abe909bSRuslan Ermilov.Dq Li k7-dc-refills-from-l2 ,
5119abe909bSRuslan Ermilov.Dq Li k7-dc-refills-from-system
512ebccf1e3SJoseph Koshyand
5139abe909bSRuslan Ermilov.Dq Li k7-dc-writebacks .
514ebccf1e3SJoseph KoshyHere
515ebccf1e3SJoseph Koshy.Ar mask
5169abe909bSRuslan Ermilovis a string of the following characters optionally separated by
5179abe909bSRuslan Ermilov.Ql +
518ebccf1e3SJoseph Koshycharacters:
5199abe909bSRuslan Ermilov.Pp
520ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
521ebccf1e3SJoseph Koshy.It Li m
522ebccf1e3SJoseph KoshyCount operations for lines in the
523ebccf1e3SJoseph Koshy.Dq Modified
524ebccf1e3SJoseph Koshystate.
525ebccf1e3SJoseph Koshy.It Li o
526ebccf1e3SJoseph KoshyCount operations for lines in the
527ebccf1e3SJoseph Koshy.Dq Owner
528ebccf1e3SJoseph Koshystate.
529ebccf1e3SJoseph Koshy.It Li e
530ebccf1e3SJoseph KoshyCount operations for lines in the
531ebccf1e3SJoseph Koshy.Dq Exclusive
532ebccf1e3SJoseph Koshystate.
533ebccf1e3SJoseph Koshy.It Li s
534ebccf1e3SJoseph KoshyCount operations for lines in the
535ebccf1e3SJoseph Koshy.Dq Shared
536ebccf1e3SJoseph Koshystate.
537ebccf1e3SJoseph Koshy.It Li i
538ebccf1e3SJoseph KoshyCount operations for lines in the
539ebccf1e3SJoseph Koshy.Dq Invalid
540ebccf1e3SJoseph Koshystate.
541ebccf1e3SJoseph Koshy.El
5429abe909bSRuslan Ermilov.Pp
543ebccf1e3SJoseph KoshyIf no
5449abe909bSRuslan Ermilov.Dq Li unitmask
545ebccf1e3SJoseph Koshyqualifier is specified, the default is to count events for caches
546ebccf1e3SJoseph Koshylines in any of the above states.
547ebccf1e3SJoseph Koshy.It Li usr
548ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
549ebccf1e3SJoseph Koshyor 3.
550ebccf1e3SJoseph Koshy.El
5519abe909bSRuslan Ermilov.Pp
552ebccf1e3SJoseph KoshyIf neither of the
5539abe909bSRuslan Ermilov.Dq Li os
554ebccf1e3SJoseph Koshyor
5559abe909bSRuslan Ermilov.Dq Li usr
556ebccf1e3SJoseph Koshyqualifiers were specified, the default is to enable both.
557ebccf1e3SJoseph Koshy.Pp
5589abe909bSRuslan ErmilovThe event specifiers supported on AMD K7 PMCs are:
559ebccf1e3SJoseph Koshy.Bl -tag -width indent
560ebccf1e3SJoseph Koshy.It Li k7-dc-accesses
561ebccf1e3SJoseph KoshyCount data cache accesses.
562ebccf1e3SJoseph Koshy.It Li k7-dc-misses
563ebccf1e3SJoseph KoshyCount data cache misses.
564ebccf1e3SJoseph Koshy.It Li k7-dc-refills-from-l2 Op Li ,unitmask= Ns Ar mask
565ebccf1e3SJoseph KoshyCount data cache refills from L2 cache.
566ebccf1e3SJoseph KoshyThis event may be further qualified using the
5679abe909bSRuslan Ermilov.Dq Li unitmask
568ebccf1e3SJoseph Koshyqualifier.
569ebccf1e3SJoseph Koshy.It Li k7-dc-refills-from-system Op Li ,unitmask= Ns Ar mask
570ebccf1e3SJoseph KoshyCount data cache refills from system memory.
571ebccf1e3SJoseph KoshyThis event may be further qualified using the
5729abe909bSRuslan Ermilov.Dq Li unitmask
573ebccf1e3SJoseph Koshyqualifier.
574ebccf1e3SJoseph Koshy.It Li k7-dc-writebacks Op Li ,unitmask= Ns Ar mask
575ebccf1e3SJoseph KoshyCount data cache writebacks.
576ebccf1e3SJoseph KoshyThis event may be further qualified using the
5779abe909bSRuslan Ermilov.Dq Li unitmask
578ebccf1e3SJoseph Koshyqualifier.
579ebccf1e3SJoseph Koshy.It Li k7-l1-dtlb-miss-and-l2-dtlb-hits
580ebccf1e3SJoseph KoshyCount L1 DTLB misses and L2 DTLB hits.
581ebccf1e3SJoseph Koshy.It Li k7-l1-and-l2-dtlb-misses
582ebccf1e3SJoseph KoshyCount L1 and L2 DTLB misses.
583ebccf1e3SJoseph Koshy.It Li k7-misaligned-references
584ebccf1e3SJoseph KoshyCount misaligned data references.
585ebccf1e3SJoseph Koshy.It Li k7-ic-fetches
586ebccf1e3SJoseph KoshyCount instruction cache fetches.
587ebccf1e3SJoseph Koshy.It Li k7-ic-misses
588ebccf1e3SJoseph KoshyCount instruction cache misses.
589ebccf1e3SJoseph Koshy.It Li k7-l1-itlb-misses
590ebccf1e3SJoseph KoshyCount L1 ITLB misses that are L2 ITLB hits.
591ebccf1e3SJoseph Koshy.It Li k7-l1-l2-itlb-misses
592ebccf1e3SJoseph KoshyCount L1 (and L2) ITLB misses.
593ebccf1e3SJoseph Koshy.It Li k7-retired-instructions
594ebccf1e3SJoseph KoshyCount all retired instructions.
595ebccf1e3SJoseph Koshy.It Li k7-retired-ops
596ebccf1e3SJoseph KoshyCount retired ops.
597ebccf1e3SJoseph Koshy.It Li k7-retired-branches
598ebccf1e3SJoseph KoshyCount all retired branches (conditional, unconditional, exceptions
599ebccf1e3SJoseph Koshyand interrupts).
600ebccf1e3SJoseph Koshy.It Li k7-retired-branches-mispredicted
601ebccf1e3SJoseph KoshyCount all misprediced retired branches.
602ebccf1e3SJoseph Koshy.It Li k7-retired-taken-branches
603ebccf1e3SJoseph KoshyCount retired taken branches.
604ebccf1e3SJoseph Koshy.It Li k7-retired-taken-branches-mispredicted
605ebccf1e3SJoseph KoshyCount mispredicted taken branches that were retired.
606ebccf1e3SJoseph Koshy.It Li k7-retired-far-control-transfers
607ebccf1e3SJoseph KoshyCount retired far control transfers.
608ebccf1e3SJoseph Koshy.It Li k7-retired-resync-branches
609ebccf1e3SJoseph KoshyCount retired resync branches (non control transfer branches).
610ebccf1e3SJoseph Koshy.It Li k7-interrupts-masked-cycles
611ebccf1e3SJoseph KoshyCount the number of cycles when the processor's
6129abe909bSRuslan Ermilov.Va IF
613ebccf1e3SJoseph Koshyflag was zero.
614ebccf1e3SJoseph Koshy.It Li k7-interrupts-masked-while-pending-cycles
615ebccf1e3SJoseph KoshyCount the number of cycles interrupts were masked while pending due
616ebccf1e3SJoseph Koshyto the processor's
6179abe909bSRuslan Ermilov.Va IF
618ebccf1e3SJoseph Koshyflag being zero.
619ebccf1e3SJoseph Koshy.It Li k7-hardware-interrupts
620ebccf1e3SJoseph KoshyCount the number of taken hardware interrupts.
621ebccf1e3SJoseph Koshy.El
622ebccf1e3SJoseph Koshy.Ss AMD (K8) PMCs
623ebccf1e3SJoseph KoshyThese PMCs are present in the
624ebccf1e3SJoseph Koshy.Tn "AMD Athlon64"
625ebccf1e3SJoseph Koshyand
626ebccf1e3SJoseph Koshy.Tn "AMD Opteron"
627ebccf1e3SJoseph Koshyseries of CPUs.
628ebccf1e3SJoseph KoshyThey are documented in:
629ebccf1e3SJoseph Koshy.Rs
630ebccf1e3SJoseph Koshy.%B "BIOS and Kernel Developer's Guide for the AMD Athlon(tm) 64 and AMD Opteron Processors"
631ebccf1e3SJoseph Koshy.%N "Publication No. 26094"
632ebccf1e3SJoseph Koshy.%D "April 2004"
6339abe909bSRuslan Ermilov.%Q "Advanced Micro Devices, Inc."
634ebccf1e3SJoseph Koshy.Re
635ebccf1e3SJoseph Koshy.Pp
636ebccf1e3SJoseph KoshyEvent specifiers for AMD K8 PMCs can have the following optional
637ebccf1e3SJoseph Koshyqualifiers:
638ebccf1e3SJoseph Koshy.Bl -tag -width indent
639ebccf1e3SJoseph Koshy.It Li count= Ns Ar value
640ebccf1e3SJoseph KoshyConfigure the counter to increment only if the number of configured
641ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
642ebccf1e3SJoseph Koshy.Ar value .
643ebccf1e3SJoseph Koshy.It Li edge
644ebccf1e3SJoseph KoshyConfigure the counter to only count negated-to-asserted transitions
645ebccf1e3SJoseph Koshyof the conditions expressed by the other fields.
646ebccf1e3SJoseph KoshyIn other words, the counter will increment only once whenever a given
647ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
648ebccf1e3SJoseph Koshywhich the condition remains true.
649ebccf1e3SJoseph Koshy.It Li inv
650ebccf1e3SJoseph KoshyInvert the sense of comparision when the
6519abe909bSRuslan Ermilov.Dq Li count
652ebccf1e3SJoseph Koshyqualifier is present, making the counter to increment when the
653ebccf1e3SJoseph Koshynumber of events per cycle is less than the value specified by
654ebccf1e3SJoseph Koshythe
6559abe909bSRuslan Ermilov.Dq Li count
656ebccf1e3SJoseph Koshyqualifier.
657ebccf1e3SJoseph Koshy.It Li mask= Ns Ar qualifier
658ebccf1e3SJoseph KoshyMany event specifiers for AMD K8 PMCs need to be additionally
659ebccf1e3SJoseph Koshyqualified using a mask qualifier.
660ebccf1e3SJoseph KoshyThese additional qualifiers are event-specific and are documented
661ebccf1e3SJoseph Koshyalong with their associated event specifiers below.
662ebccf1e3SJoseph Koshy.It Li os
663ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at privilege level 0.
664ebccf1e3SJoseph Koshy.It Li usr
665ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
666ebccf1e3SJoseph Koshyor 3.
667ebccf1e3SJoseph Koshy.El
6689abe909bSRuslan Ermilov.Pp
669ebccf1e3SJoseph KoshyIf neither of the
6709abe909bSRuslan Ermilov.Dq Li os
671ebccf1e3SJoseph Koshyor
6729abe909bSRuslan Ermilov.Dq Li usr
673ebccf1e3SJoseph Koshyqualifiers were specified, the default is to enable both.
674ebccf1e3SJoseph Koshy.Pp
6759abe909bSRuslan ErmilovThe event specifiers supported on AMD K8 PMCs are:
676ebccf1e3SJoseph Koshy.Bl -tag -width indent
677ebccf1e3SJoseph Koshy.It Li k8-bu-cpu-clk-unhalted
678ebccf1e3SJoseph KoshyCount the number of clock cycles when the CPU is not in the HLT or
679ebccf1e3SJoseph KoshySTPCLK states.
680ebccf1e3SJoseph Koshy.It Li k8-bu-fill-request-l2-miss Op Li ,mask= Ns Ar qualifier
681ebccf1e3SJoseph KoshyCount fill requests that missed in the L2 cache.
682ebccf1e3SJoseph KoshyThis event may be further qualified using
683ebccf1e3SJoseph Koshy.Ar qualifier ,
684ebccf1e3SJoseph Koshywhich is a
6859abe909bSRuslan Ermilov.Ql +
686ebccf1e3SJoseph Koshyseparated set of the following keywords:
6879abe909bSRuslan Ermilov.Pp
6889abe909bSRuslan Ermilov.Bl -tag -width indent -compact
689ebccf1e3SJoseph Koshy.It Li dc-fill
690ebccf1e3SJoseph KoshyCount data cache fill requests.
691ebccf1e3SJoseph Koshy.It Li ic-fill
692ebccf1e3SJoseph KoshyCount instruction cache fill requests.
693ebccf1e3SJoseph Koshy.It Li tlb-reload
694ebccf1e3SJoseph KoshyCount TLB reloads.
695ebccf1e3SJoseph Koshy.El
6969abe909bSRuslan Ermilov.Pp
697ebccf1e3SJoseph KoshyThe default is to count all types of requests.
698ebccf1e3SJoseph Koshy.It Li k8-bu-internal-l2-request Op Li ,mask= Ns Ar qualifier
699ebccf1e3SJoseph KoshyCount internally generated requests to the L2 cache.
700ebccf1e3SJoseph KoshyThis event may be further qualified using
701ebccf1e3SJoseph Koshy.Ar qualifier ,
702ebccf1e3SJoseph Koshywhich is a
7039abe909bSRuslan Ermilov.Ql +
704ebccf1e3SJoseph Koshyseparated set of the following keywords:
7059abe909bSRuslan Ermilov.Pp
7069abe909bSRuslan Ermilov.Bl -tag -width indent -compact
707ebccf1e3SJoseph Koshy.It Li cancelled
708ebccf1e3SJoseph KoshyCount cancelled requests.
709ebccf1e3SJoseph Koshy.It Li dc-fill
710ebccf1e3SJoseph KoshyCount data cache fill requests.
711ebccf1e3SJoseph Koshy.It Li ic-fill
712ebccf1e3SJoseph KoshyCount instruction cache fill requests.
713ebccf1e3SJoseph Koshy.It Li tag-snoop
714ebccf1e3SJoseph KoshyCount tag snoop requests.
715ebccf1e3SJoseph Koshy.It Li tlb-reload
716ebccf1e3SJoseph KoshyCount TLB reloads.
717ebccf1e3SJoseph Koshy.El
7189abe909bSRuslan Ermilov.Pp
719ebccf1e3SJoseph KoshyThe default is to count all types of requests.
720ebccf1e3SJoseph Koshy.It Li k8-dc-access
721ebccf1e3SJoseph KoshyCount data cache accesses including microcode scratchpad accesses.
722ebccf1e3SJoseph Koshy.It Li k8-dc-copyback Op Li ,mask= Ns Ar qualifier
723ebccf1e3SJoseph KoshyCount data cache copyback operations.
724ebccf1e3SJoseph KoshyThis event may be further qualified using
725ebccf1e3SJoseph Koshy.Ar qualifier ,
726ebccf1e3SJoseph Koshywhich is a
7279abe909bSRuslan Ermilov.Ql +
728ebccf1e3SJoseph Koshyseparated set of the following keywords:
7299abe909bSRuslan Ermilov.Pp
7309abe909bSRuslan Ermilov.Bl -tag -width indent -compact
731ebccf1e3SJoseph Koshy.It Li exclusive
732ebccf1e3SJoseph KoshyCount operations for lines in the
733ebccf1e3SJoseph Koshy.Dq exclusive
734ebccf1e3SJoseph Koshystate.
735ebccf1e3SJoseph Koshy.It Li invalid
736ebccf1e3SJoseph KoshyCount operations for lines in the
737ebccf1e3SJoseph Koshy.Dq invalid
738ebccf1e3SJoseph Koshystate.
739ebccf1e3SJoseph Koshy.It Li modified
740ebccf1e3SJoseph KoshyCount operations for lines in the
741ebccf1e3SJoseph Koshy.Dq modified
742ebccf1e3SJoseph Koshystate.
743ebccf1e3SJoseph Koshy.It Li owner
744ebccf1e3SJoseph KoshyCount operations for lines in the
745ebccf1e3SJoseph Koshy.Dq owner
746ebccf1e3SJoseph Koshystate.
747ebccf1e3SJoseph Koshy.It Li shared
748ebccf1e3SJoseph KoshyCount operations for lines in the
749ebccf1e3SJoseph Koshy.Dq shared
750ebccf1e3SJoseph Koshystate.
751ebccf1e3SJoseph Koshy.El
7529abe909bSRuslan Ermilov.Pp
753ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
754ebccf1e3SJoseph Koshyabove states.
755ebccf1e3SJoseph Koshy.It Li k8-dc-dcache-accesses-by-locks Op Li ,mask= Ns Ar qualifier
756ebccf1e3SJoseph KoshyCount data cache accesses by lock instructions.
757ebccf1e3SJoseph KoshyThis event is only available on processors of revision C or later
758ebccf1e3SJoseph Koshyvintage.
759ebccf1e3SJoseph KoshyThis event may be further qualified using
760ebccf1e3SJoseph Koshy.Ar qualifier ,
761ebccf1e3SJoseph Koshywhich is a
7629abe909bSRuslan Ermilov.Ql +
763ebccf1e3SJoseph Koshyseparated set of the following keywords:
7649abe909bSRuslan Ermilov.Pp
7659abe909bSRuslan Ermilov.Bl -tag -width indent -compact
766ebccf1e3SJoseph Koshy.It Li accesses
767ebccf1e3SJoseph KoshyCount data cache accesses by lock instructions.
768ebccf1e3SJoseph Koshy.It Li misses
769ebccf1e3SJoseph KoshyCount data cache misses by lock instructions.
770ebccf1e3SJoseph Koshy.El
7719abe909bSRuslan Ermilov.Pp
772ebccf1e3SJoseph KoshyThe default is to count all accesses.
773ebccf1e3SJoseph Koshy.It Li k8-dc-dispatched-prefetch-instructions Op Li ,mask= Ns Ar qualifier
774ebccf1e3SJoseph KoshyCount the number of dispatched prefetch instructions.
775ebccf1e3SJoseph KoshyThis event may be further qualified using
776ebccf1e3SJoseph Koshy.Ar qualifier ,
777ebccf1e3SJoseph Koshywhich is a
7789abe909bSRuslan Ermilov.Ql +
779ebccf1e3SJoseph Koshyseparated set of the following keywords:
7809abe909bSRuslan Ermilov.Pp
7819abe909bSRuslan Ermilov.Bl -tag -width indent -compact
782ebccf1e3SJoseph Koshy.It Li load
783ebccf1e3SJoseph KoshyCount load operations.
784ebccf1e3SJoseph Koshy.It Li nta
785ebccf1e3SJoseph KoshyCount non-temporal operations.
786ebccf1e3SJoseph Koshy.It Li store
787ebccf1e3SJoseph KoshyCount store operations.
788ebccf1e3SJoseph Koshy.El
7899abe909bSRuslan Ermilov.Pp
790ebccf1e3SJoseph KoshyThe default is to count all operations.
791ebccf1e3SJoseph Koshy.It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-hit
792ebccf1e3SJoseph KoshyCount L1 DTLB misses that are L2 DTLB hits.
793ebccf1e3SJoseph Koshy.It Li k8-dc-l1-dtlb-miss-and-l2-dtlb-miss
794ebccf1e3SJoseph KoshyCount L1 DTLB misses that are also misses in the L2 DTLB.
795ebccf1e3SJoseph Koshy.It Li k8-dc-microarchitectural-early-cancel-of-an-access
796ebccf1e3SJoseph KoshyCount microarchitectural early cancels of data cache accesses.
797ebccf1e3SJoseph Koshy.It Li k8-dc-microarchitectural-late-cancel-of-an-access
798ebccf1e3SJoseph KoshyCount microarchitectural late cancels of data cache accesses.
799ebccf1e3SJoseph Koshy.It Li k8-dc-misaligned-data-reference
800ebccf1e3SJoseph KoshyCount misaligned data references.
801ebccf1e3SJoseph Koshy.It Li k8-dc-miss
802ebccf1e3SJoseph KoshyCount data cache misses.
803ebccf1e3SJoseph Koshy.It Li k8-dc-one-bit-ecc-error Op Li ,mask= Ns Ar qualifier
804ebccf1e3SJoseph KoshyCount one bit ECC errors found by the scrubber.
805ebccf1e3SJoseph KoshyThis event may be further qualified using
806ebccf1e3SJoseph Koshy.Ar qualifier ,
807ebccf1e3SJoseph Koshywhich is a
8089abe909bSRuslan Ermilov.Ql +
809ebccf1e3SJoseph Koshyseparated set of the following keywords:
8109abe909bSRuslan Ermilov.Pp
8119abe909bSRuslan Ermilov.Bl -tag -width indent -compact
812ebccf1e3SJoseph Koshy.It Li scrubber
813ebccf1e3SJoseph KoshyCount scrubber detected errors.
814ebccf1e3SJoseph Koshy.It Li piggyback
815ebccf1e3SJoseph KoshyCount piggyback scrubber errors.
816ebccf1e3SJoseph Koshy.El
8179abe909bSRuslan Ermilov.Pp
818ebccf1e3SJoseph KoshyThe default is to count both kinds of errors.
819ebccf1e3SJoseph Koshy.It Li k8-dc-refill-from-l2 Op Li ,mask= Ns Ar qualifier
820ebccf1e3SJoseph KoshyCount data cache refills from L2 cache.
821ebccf1e3SJoseph KoshyThis event may be further qualified using
822ebccf1e3SJoseph Koshy.Ar qualifier ,
823ebccf1e3SJoseph Koshywhich is a
8249abe909bSRuslan Ermilov.Ql +
825ebccf1e3SJoseph Koshyseparated set of the following keywords:
8269abe909bSRuslan Ermilov.Pp
8279abe909bSRuslan Ermilov.Bl -tag -width indent -compact
828ebccf1e3SJoseph Koshy.It Li exclusive
829ebccf1e3SJoseph KoshyCount operations for lines in the
830ebccf1e3SJoseph Koshy.Dq exclusive
831ebccf1e3SJoseph Koshystate.
832ebccf1e3SJoseph Koshy.It Li invalid
833ebccf1e3SJoseph KoshyCount operations for lines in the
834ebccf1e3SJoseph Koshy.Dq invalid
835ebccf1e3SJoseph Koshystate.
836ebccf1e3SJoseph Koshy.It Li modified
837ebccf1e3SJoseph KoshyCount operations for lines in the
838ebccf1e3SJoseph Koshy.Dq modified
839ebccf1e3SJoseph Koshystate.
840ebccf1e3SJoseph Koshy.It Li owner
841ebccf1e3SJoseph KoshyCount operations for lines in the
842ebccf1e3SJoseph Koshy.Dq owner
843ebccf1e3SJoseph Koshystate.
844ebccf1e3SJoseph Koshy.It Li shared
845ebccf1e3SJoseph KoshyCount operations for lines in the
846ebccf1e3SJoseph Koshy.Dq shared
847ebccf1e3SJoseph Koshystate.
848ebccf1e3SJoseph Koshy.El
8499abe909bSRuslan Ermilov.Pp
850ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
851ebccf1e3SJoseph Koshyabove states.
852ebccf1e3SJoseph Koshy.It Li k8-dc-refill-from-system Op Li ,mask= Ns Ar qualifier
853ebccf1e3SJoseph KoshyCount data cache refills from system memory.
854ebccf1e3SJoseph KoshyThis event may be further qualified using
855ebccf1e3SJoseph Koshy.Ar qualifier ,
856ebccf1e3SJoseph Koshywhich is a
8579abe909bSRuslan Ermilov.Ql +
858ebccf1e3SJoseph Koshyseparated set of the following keywords:
8599abe909bSRuslan Ermilov.Pp
8609abe909bSRuslan Ermilov.Bl -tag -width indent -compact
861ebccf1e3SJoseph Koshy.It Li exclusive
862ebccf1e3SJoseph KoshyCount operations for lines in the
863ebccf1e3SJoseph Koshy.Dq exclusive
864ebccf1e3SJoseph Koshystate.
865ebccf1e3SJoseph Koshy.It Li invalid
866ebccf1e3SJoseph KoshyCount operations for lines in the
867ebccf1e3SJoseph Koshy.Dq invalid
868ebccf1e3SJoseph Koshystate.
869ebccf1e3SJoseph Koshy.It Li modified
870ebccf1e3SJoseph KoshyCount operations for lines in the
871ebccf1e3SJoseph Koshy.Dq modified
872ebccf1e3SJoseph Koshystate.
873ebccf1e3SJoseph Koshy.It Li owner
874ebccf1e3SJoseph KoshyCount operations for lines in the
875ebccf1e3SJoseph Koshy.Dq owner
876ebccf1e3SJoseph Koshystate.
877ebccf1e3SJoseph Koshy.It Li shared
878ebccf1e3SJoseph KoshyCount operations for lines in the
879ebccf1e3SJoseph Koshy.Dq shared
880ebccf1e3SJoseph Koshystate.
881ebccf1e3SJoseph Koshy.El
8829abe909bSRuslan Ermilov.Pp
883ebccf1e3SJoseph KoshyThe default is to count operations for lines in all the
884ebccf1e3SJoseph Koshyabove states.
885ebccf1e3SJoseph Koshy.It Li k8-fp-dispatched-fpu-ops Op Li ,mask= Ns Ar qualifier
886ebccf1e3SJoseph KoshyCount the number of dispatched FPU ops.
887ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
888ebccf1e3SJoseph KoshyThis event may be further qualified using
889ebccf1e3SJoseph Koshy.Ar qualifier ,
890ebccf1e3SJoseph Koshywhich is a
8919abe909bSRuslan Ermilov.Ql +
892ebccf1e3SJoseph Koshyseparated set of the following keywords:
8939abe909bSRuslan Ermilov.Pp
8949abe909bSRuslan Ermilov.Bl -tag -width indent -compact
895ebccf1e3SJoseph Koshy.It Li add-pipe-excluding-junk-ops
896ebccf1e3SJoseph KoshyCount add pipe ops excluding junk ops.
897ebccf1e3SJoseph Koshy.It Li add-pipe-junk-ops
898ebccf1e3SJoseph KoshyCount junk ops in the add pipe.
899ebccf1e3SJoseph Koshy.It Li multiply-pipe-excluding-junk-ops
900ebccf1e3SJoseph KoshyCount multiply pipe ops excluding junk ops.
901ebccf1e3SJoseph Koshy.It Li multiply-pipe-junk-ops
902ebccf1e3SJoseph KoshyCount junk ops in the multiply pipe.
903ebccf1e3SJoseph Koshy.It Li store-pipe-excluding-junk-ops
904ebccf1e3SJoseph KoshyCount store pipe ops excluding junk ops
905ebccf1e3SJoseph Koshy.It Li store-pipe-junk-ops
906ebccf1e3SJoseph KoshyCount junk ops in the store pipe.
907ebccf1e3SJoseph Koshy.El
9089abe909bSRuslan Ermilov.Pp
909ebccf1e3SJoseph KoshyThe default is to count all types of ops.
910ebccf1e3SJoseph Koshy.It Li k8-fp-cycles-with-no-fpu-ops-retired
911ebccf1e3SJoseph KoshyCount cycles when no FPU ops were retired.
912ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
913ebccf1e3SJoseph Koshy.It Li k8-fp-dispatched-fpu-fast-flag-ops
914ebccf1e3SJoseph KoshyCount dispatched FPU ops that use the fast flag interface.
915ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
916ebccf1e3SJoseph Koshy.It Li k8-fr-decoder-empty
917ebccf1e3SJoseph KoshyCount cycles when there was nothing to dispatch (i.e., the decoder
918ebccf1e3SJoseph Koshywas empty).
919ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stalls
920ebccf1e3SJoseph KoshyCount all dispatch stalls.
921ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-for-segment-load
922ebccf1e3SJoseph KoshyCount dispatch stalls for segment loads.
923ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-for-serialization
924ebccf1e3SJoseph KoshyCount dispatch stalls for serialization.
925ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-from-branch-abort-to-retire
926ebccf1e3SJoseph KoshyCount dispatch stalls from branch abort to retiral.
927ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-fpu-is-full
928ebccf1e3SJoseph KoshyCount dispatch stalls when the FPU is full.
929ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-ls-is-full
930ebccf1e3SJoseph KoshyCount dispatch stalls when the load/store unit is full.
931ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-reorder-buffer-is-full
932ebccf1e3SJoseph KoshyCount dispatch stalls when the reorder buffer is full.
933ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-reservation-stations-are-full
934ebccf1e3SJoseph KoshyCount dispatch stalls when reservation stations are full.
935ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-waiting-for-all-to-be-quiet
936ebccf1e3SJoseph KoshyCount dispatch stalls when waiting for all to be quiet.
937ebccf1e3SJoseph Koshy.\" XXX What does "waiting for all to be quiet" mean?
938ebccf1e3SJoseph Koshy.It Li k8-fr-dispatch-stall-when-waiting-far-xfer-or-resync-branch-pending
939ebccf1e3SJoseph KoshyCount dispatch stalls when a far control transfer or a resync branch
940ebccf1e3SJoseph Koshyis pending.
941ebccf1e3SJoseph Koshy.It Li k8-fr-fpu-exceptions Op Li ,mask= Ns Ar qualifier
942ebccf1e3SJoseph KoshyCount FPU exceptions.
943ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
944ebccf1e3SJoseph KoshyThis event may be further qualified using
945ebccf1e3SJoseph Koshy.Ar qualifier ,
946ebccf1e3SJoseph Koshywhich is a
9479abe909bSRuslan Ermilov.Ql +
948ebccf1e3SJoseph Koshyseparated set of the following keywords:
9499abe909bSRuslan Ermilov.Pp
9509abe909bSRuslan Ermilov.Bl -tag -width indent -compact
951ebccf1e3SJoseph Koshy.It Li sse-and-x87-microtraps
952ebccf1e3SJoseph KoshyCount SSE and x87 microtraps.
953ebccf1e3SJoseph Koshy.It Li sse-reclass-microfaults
954ebccf1e3SJoseph KoshyCount SSE reclass microfaults
955ebccf1e3SJoseph Koshy.It Li sse-retype-microfaults
956ebccf1e3SJoseph KoshyCount SSE retype microfaults
957ebccf1e3SJoseph Koshy.It Li x87-reclass-microfaults
958ebccf1e3SJoseph KoshyCount x87 reclass microfaults.
959ebccf1e3SJoseph Koshy.El
9609abe909bSRuslan Ermilov.Pp
961ebccf1e3SJoseph KoshyThe default is to count all types of exceptions.
962ebccf1e3SJoseph Koshy.It Li k8-fr-interrupts-masked-cycles
963ebccf1e3SJoseph KoshyCount cycles when interrupts were masked (by CPU RFLAGS field IF was zero).
964ebccf1e3SJoseph Koshy.It Li k8-fr-interrupts-masked-while-pending-cycles
965ebccf1e3SJoseph KoshyCount cycles while interrupts were masked while pending (i.e., cycles
966ebccf1e3SJoseph Koshywhen INTR was asserted while CPU RFLAGS field IF was zero).
967ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr0
968ebccf1e3SJoseph KoshyCount the number of breakpoints for DR0.
969ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr1
970ebccf1e3SJoseph KoshyCount the number of breakpoints for DR1.
971ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr2
972ebccf1e3SJoseph KoshyCount the number of breakpoints for DR2.
973ebccf1e3SJoseph Koshy.It Li k8-fr-number-of-breakpoints-for-dr3
974ebccf1e3SJoseph KoshyCount the number of breakpoints for DR3.
975ebccf1e3SJoseph Koshy.It Li k8-fr-retired-branches
976ebccf1e3SJoseph KoshyCount retired branches including exceptions and interrupts.
977ebccf1e3SJoseph Koshy.It Li k8-fr-retired-branches-mispredicted
978ebccf1e3SJoseph KoshyCount mispredicted retired branches.
979ebccf1e3SJoseph Koshy.It Li k8-fr-retired-far-control-transfers
980ebccf1e3SJoseph KoshyCount retired far control transfers (which are always mispredicted).
981ebccf1e3SJoseph Koshy.It Li k8-fr-retired-fastpath-double-op-instructions Op Li ,mask= Ns Ar qualifier
982ebccf1e3SJoseph KoshyCount retired fastpath double op instructions.
983ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
984ebccf1e3SJoseph KoshyThis event may be further qualified using
985ebccf1e3SJoseph Koshy.Ar qualifier ,
986ebccf1e3SJoseph Koshywhich is a
9879abe909bSRuslan Ermilov.Ql +
988ebccf1e3SJoseph Koshyseparated set of the following keywords:
9899abe909bSRuslan Ermilov.Pp
9909abe909bSRuslan Ermilov.Bl -tag -width indent -compact
991ebccf1e3SJoseph Koshy.It Li low-op-pos-0
992ebccf1e3SJoseph KoshyCount instructions with the low op in position 0.
993ebccf1e3SJoseph Koshy.It Li low-op-pos-1
994ebccf1e3SJoseph KoshyCount instructions with the low op in position 1.
995ebccf1e3SJoseph Koshy.It Li low-op-pos-2
996ebccf1e3SJoseph KoshyCount instructions with the low op in position 2.
997ebccf1e3SJoseph Koshy.El
9989abe909bSRuslan Ermilov.Pp
999ebccf1e3SJoseph KoshyThe default is to count all types of instructions.
1000ebccf1e3SJoseph Koshy.It Li k8-fr-retired-fpu-instructions Op Li ,mask= Ns Ar qualifier
1001ebccf1e3SJoseph KoshyCount retired FPU instructions.
1002ebccf1e3SJoseph KoshyThis event is supported in revision B and later CPUs.
1003ebccf1e3SJoseph KoshyThis event may be further qualified using
1004ebccf1e3SJoseph Koshy.Ar qualifier ,
1005ebccf1e3SJoseph Koshywhich is a
10069abe909bSRuslan Ermilov.Ql +
1007ebccf1e3SJoseph Koshyseparated set of the following keywords:
10089abe909bSRuslan Ermilov.Pp
10099abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1010ebccf1e3SJoseph Koshy.It Li mmx-3dnow
10119abe909bSRuslan ErmilovCount MMX and 3DNow!\& instructions.
1012ebccf1e3SJoseph Koshy.It Li packed-sse-sse2
1013ebccf1e3SJoseph KoshyCount packed SSE and SSE2 instructions.
1014ebccf1e3SJoseph Koshy.It Li scalar-sse-sse2
1015ebccf1e3SJoseph KoshyCount scalar SSE and SSE2 instructions
1016ebccf1e3SJoseph Koshy.It Li x87
1017ebccf1e3SJoseph KoshyCount x87 instructions.
1018ebccf1e3SJoseph Koshy.El
10199abe909bSRuslan Ermilov.Pp
1020ebccf1e3SJoseph KoshyThe default is to count all types of instructions.
1021ebccf1e3SJoseph Koshy.It Li k8-fr-retired-near-returns
1022ebccf1e3SJoseph KoshyCount retired near returns.
1023ebccf1e3SJoseph Koshy.It Li k8-fr-retired-near-returns-mispredicted
1024ebccf1e3SJoseph KoshyCount mispredicted near returns.
1025ebccf1e3SJoseph Koshy.It Li k8-fr-retired-resyncs
1026ebccf1e3SJoseph KoshyCount retired resyncs (non-control transfer branches).
1027ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-hardware-interrupts
1028ebccf1e3SJoseph KoshyCount retired taken hardware interrupts.
1029ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches
1030ebccf1e3SJoseph KoshyCount retired taken branches.
1031ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches-mispredicted
1032ebccf1e3SJoseph KoshyCount retired taken branches that were mispredicted.
1033ebccf1e3SJoseph Koshy.It Li k8-fr-retired-taken-branches-mispredicted-by-addr-miscompare
1034ebccf1e3SJoseph KoshyCount retired taken branches that were mispredicted only due to an
1035ebccf1e3SJoseph Koshyaddress miscompare.
1036ebccf1e3SJoseph Koshy.It Li k8-fr-retired-uops
1037ebccf1e3SJoseph KoshyCount retired uops.
1038ebccf1e3SJoseph Koshy.It Li k8-fr-retired-x86-instructions
1039ebccf1e3SJoseph KoshyCount retired x86 instructions including exceptions and interrupts.
1040ebccf1e3SJoseph Koshy.It Li k8-ic-fetch
1041ebccf1e3SJoseph KoshyCount instruction cache fetches.
1042ebccf1e3SJoseph Koshy.It Li k8-ic-instruction-fetch-stall
1043ebccf1e3SJoseph KoshyCount cycles in stalls due to instruction fetch.
1044ebccf1e3SJoseph Koshy.It Li k8-ic-l1-itlb-miss-and-l2-itlb-hit
1045ebccf1e3SJoseph KoshyCount L1 ITLB misses that are L2 ITLB hits.
1046ebccf1e3SJoseph Koshy.It Li k8-ic-l1-itlb-miss-and-l2-itlb-miss
1047ebccf1e3SJoseph KoshyCount ITLB misses that miss in both L1 and L2 ITLBs.
1048ebccf1e3SJoseph Koshy.It Li k8-ic-microarchitectural-resync-by-snoop
1049ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by snoops.
1050ebccf1e3SJoseph Koshy.It Li k8-ic-miss
1051ebccf1e3SJoseph KoshyCount instruction cache misses.
1052ebccf1e3SJoseph Koshy.It Li k8-ic-refill-from-l2
1053ebccf1e3SJoseph KoshyCount instruction cache refills from L2 cache.
1054ebccf1e3SJoseph Koshy.It Li k8-ic-refill-from-system
1055ebccf1e3SJoseph KoshyCount instruction cache refills from system memory.
1056ebccf1e3SJoseph Koshy.It Li k8-ic-return-stack-hits
1057ebccf1e3SJoseph KoshyCount hits to the return stack.
1058ebccf1e3SJoseph Koshy.It Li k8-ic-return-stack-overflow
1059ebccf1e3SJoseph KoshyCount overflows of the return stack.
1060ebccf1e3SJoseph Koshy.It Li k8-ls-buffer2-full
1061ebccf1e3SJoseph KoshyCount load/store buffer2 full events.
1062ebccf1e3SJoseph Koshy.It Li k8-ls-locked-operation Op Li ,mask= Ns Ar qualifier
1063ebccf1e3SJoseph KoshyCount locked operations.
1064ebccf1e3SJoseph KoshyFor revision C and later CPUs, the following qualifiers are supported:
10659abe909bSRuslan Ermilov.Pp
10669abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1067ebccf1e3SJoseph Koshy.It Li cycles-in-request
1068ebccf1e3SJoseph KoshyCount the number of cycles in the lock request/grant stage.
1069ebccf1e3SJoseph Koshy.It Li cycles-to-complete
1070ebccf1e3SJoseph KoshyCount the number of cycles a lock takes to complete once it is
1071ebccf1e3SJoseph Koshynon-speculative and is the older load/store operation.
1072ebccf1e3SJoseph Koshy.It Li locked-instructions
1073ebccf1e3SJoseph KoshyCount the number of lock instructions executed.
1074ebccf1e3SJoseph Koshy.El
10759abe909bSRuslan Ermilov.Pp
1076ebccf1e3SJoseph KoshyThe default is to count the number of lock instructions executed.
1077ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-late-cancel
1078ebccf1e3SJoseph KoshyCount microarchitectural late cancels of operations in the load/store
1079ebccf1e3SJoseph Koshyunit.
1080ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-resync-by-self-modifying-code
1081ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by self-modifying code.
1082ebccf1e3SJoseph Koshy.It Li k8-ls-microarchitectural-resync-by-snoop
1083ebccf1e3SJoseph KoshyCount microarchitectural resyncs caused by snoops.
1084ebccf1e3SJoseph Koshy.It Li k8-ls-retired-cflush-instructions
1085ebccf1e3SJoseph KoshyCount retired CFLUSH instructions.
1086ebccf1e3SJoseph Koshy.It Li k8-ls-retired-cpuid-instructions
1087ebccf1e3SJoseph KoshyCount retired CPUID instructions.
1088ebccf1e3SJoseph Koshy.It Li k8-ls-segment-register-load Op Li ,mask= Ns Ar qualifier
1089ebccf1e3SJoseph KoshyCount segment register loads.
1090ebccf1e3SJoseph KoshyThis event may be further qualified using
1091ebccf1e3SJoseph Koshy.Ar qualifier ,
1092ebccf1e3SJoseph Koshywhich is a
10939abe909bSRuslan Ermilov.Ql +
1094ebccf1e3SJoseph Koshyseparated set of the following keywords:
10959abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1096ebccf1e3SJoseph Koshy.It Li cs
1097ebccf1e3SJoseph KoshyCount CS register loads.
1098ebccf1e3SJoseph Koshy.It Li ds
1099ebccf1e3SJoseph KoshyCount DS register loads.
1100ebccf1e3SJoseph Koshy.It Li es
1101ebccf1e3SJoseph KoshyCount ES register loads.
1102ebccf1e3SJoseph Koshy.It Li fs
1103ebccf1e3SJoseph KoshyCount FS register loads.
1104ebccf1e3SJoseph Koshy.It Li gs
1105ebccf1e3SJoseph KoshyCount GS register loads.
11069abe909bSRuslan Ermilov.\" .It Li hs
1107ebccf1e3SJoseph Koshy.\" Count HS register loads.
1108ebccf1e3SJoseph Koshy.\" XXX "HS" register?
1109ebccf1e3SJoseph Koshy.It Li ss
1110ebccf1e3SJoseph KoshyCount SS register loads.
1111ebccf1e3SJoseph Koshy.El
11129abe909bSRuslan Ermilov.Pp
1113ebccf1e3SJoseph KoshyThe default is to count all types of loads.
1114ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-bypass-saturation Op Li ,mask= Ns Ar qualifier
1115ebccf1e3SJoseph KoshyCount memory controller bypass counter saturation events.
1116ebccf1e3SJoseph KoshyThis event may be further qualified using
1117ebccf1e3SJoseph Koshy.Ar qualifier ,
1118ebccf1e3SJoseph Koshywhich is a
11199abe909bSRuslan Ermilov.Ql +
1120ebccf1e3SJoseph Koshyseparated set of the following keywords:
11219abe909bSRuslan Ermilov.Pp
11229abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1123ebccf1e3SJoseph Koshy.It Li dram-controller-interface-bypass
1124ebccf1e3SJoseph KoshyCount DRAM controller interface bypass.
1125ebccf1e3SJoseph Koshy.It Li dram-controller-queue-bypass
1126ebccf1e3SJoseph KoshyCount DRAM controller queue bypass.
1127ebccf1e3SJoseph Koshy.It Li memory-controller-hi-pri-bypass
1128ebccf1e3SJoseph KoshyCount memory controller high priority bypasses.
1129ebccf1e3SJoseph Koshy.It Li memory-controller-lo-pri-bypass
1130ebccf1e3SJoseph KoshyCount memory controller low priority bypasses.
1131ebccf1e3SJoseph Koshy.El
11329abe909bSRuslan Ermilov.Pp
1133ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-dram-slots-missed
1134ebccf1e3SJoseph KoshyCount memory controller DRAM command slots missed (in MemClks).
1135ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-page-access-event Op Li ,mask= Ns Ar qualifier
1136ebccf1e3SJoseph KoshyCount memory controller page access events.
1137ebccf1e3SJoseph KoshyThis event may be further qualified using
1138ebccf1e3SJoseph Koshy.Ar qualifier ,
1139ebccf1e3SJoseph Koshywhich is a
11409abe909bSRuslan Ermilov.Ql +
1141ebccf1e3SJoseph Koshyseparated set of the following keywords:
11429abe909bSRuslan Ermilov.Pp
11439abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1144ebccf1e3SJoseph Koshy.It Li page-conflict
1145ebccf1e3SJoseph KoshyCount page conflicts.
1146ebccf1e3SJoseph Koshy.It Li page-hit
1147ebccf1e3SJoseph KoshyCount page hits.
1148ebccf1e3SJoseph Koshy.It Li page-miss
1149ebccf1e3SJoseph KoshyCount page misses.
1150ebccf1e3SJoseph Koshy.El
11519abe909bSRuslan Ermilov.Pp
1152ebccf1e3SJoseph KoshyThe default is to count all types of events.
1153ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-page-table-overflow
1154ebccf1e3SJoseph KoshyCount memory control page table overflow events.
1155ebccf1e3SJoseph Koshy.It Li k8-nb-probe-result Op Li ,mask= Ns Ar qualifier
1156ebccf1e3SJoseph KoshyCount probe events.
1157ebccf1e3SJoseph KoshyThis event may be further qualified using
1158ebccf1e3SJoseph Koshy.Ar qualifier ,
1159ebccf1e3SJoseph Koshywhich is a
11609abe909bSRuslan Ermilov.Ql +
1161ebccf1e3SJoseph Koshyseparated set of the following keywords:
11629abe909bSRuslan Ermilov.Pp
11639abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1164ebccf1e3SJoseph Koshy.It Li probe-hit
1165ebccf1e3SJoseph KoshyCount all probe hits.
1166ebccf1e3SJoseph Koshy.It Li probe-hit-dirty-no-memory-cancel
1167ebccf1e3SJoseph KoshyCount probe hits without memory cancels.
1168ebccf1e3SJoseph Koshy.It Li probe-hit-dirty-with-memory-cancel
1169ebccf1e3SJoseph KoshyCount probe hits with memory cancels.
1170ebccf1e3SJoseph Koshy.It Li probe-miss
1171ebccf1e3SJoseph KoshyCount probe misses.
1172ebccf1e3SJoseph Koshy.El
1173ebccf1e3SJoseph Koshy.It Li k8-nb-sized-commands Op Li ,mask= Ns Ar qualifier
1174ebccf1e3SJoseph KoshyCount sized commands issued.
1175ebccf1e3SJoseph KoshyThis event may be further qualified using
1176ebccf1e3SJoseph Koshy.Ar qualifier ,
1177ebccf1e3SJoseph Koshywhich is a
11789abe909bSRuslan Ermilov.Ql +
1179ebccf1e3SJoseph Koshyseparated set of the following keywords:
11809abe909bSRuslan Ermilov.Pp
11819abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1182ebccf1e3SJoseph Koshy.It Li nonpostwrszbyte
1183ebccf1e3SJoseph Koshy.It Li nonpostwrszdword
1184ebccf1e3SJoseph Koshy.It Li postwrszbyte
1185ebccf1e3SJoseph Koshy.It Li postwrszdword
1186ebccf1e3SJoseph Koshy.It Li rdszbyte
1187ebccf1e3SJoseph Koshy.It Li rdszdword
1188ebccf1e3SJoseph Koshy.It Li rdmodwr
1189ebccf1e3SJoseph Koshy.El
11909abe909bSRuslan Ermilov.Pp
1191ebccf1e3SJoseph KoshyThe default is to count all types of commands.
1192ebccf1e3SJoseph Koshy.It Li k8-nb-memory-controller-turnaround Op Li ,mask= Ns Ar qualifier
1193ebccf1e3SJoseph KoshyCount memory control turnaround events.
1194ebccf1e3SJoseph KoshyThis event may be further qualified using
1195ebccf1e3SJoseph Koshy.Ar qualifier ,
1196ebccf1e3SJoseph Koshywhich is a
11979abe909bSRuslan Ermilov.Ql +
1198ebccf1e3SJoseph Koshyseparated set of the following keywords:
11999abe909bSRuslan Ermilov.Pp
12009abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1201ebccf1e3SJoseph Koshy.\" XXX doc is unclear whether these are cycle counts or event counts
1202ebccf1e3SJoseph Koshy.It Li dimm-turnaround
1203ebccf1e3SJoseph KoshyCount DIMM turnarounds.
1204ebccf1e3SJoseph Koshy.It Li read-to-write-turnaround
1205ebccf1e3SJoseph KoshyCount read to write turnarounds.
1206ebccf1e3SJoseph Koshy.It Li write-to-read-turnaround
1207ebccf1e3SJoseph KoshyCount write to read turnarounds.
1208ebccf1e3SJoseph Koshy.El
12099abe909bSRuslan Ermilov.Pp
1210ebccf1e3SJoseph KoshyThe default is to count all types of events.
1211ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus0-bandwidth Op Li ,mask= Ns Ar qualifier
1212ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus1-bandwidth Op Li ,mask= Ns Ar qualifier
1213ebccf1e3SJoseph Koshy.It Li k8-nb-ht-bus2-bandwidth Op Li ,mask= Ns Ar qualifier
1214ebccf1e3SJoseph KoshyCount events on the HyperTransport(tm) buses.
1215ebccf1e3SJoseph KoshyThese events may be further qualified using
1216ebccf1e3SJoseph Koshy.Ar qualifier ,
1217ebccf1e3SJoseph Koshywhich is a
12189abe909bSRuslan Ermilov.Ql +
1219ebccf1e3SJoseph Koshyseparated set of the following keywords:
12209abe909bSRuslan Ermilov.Pp
12219abe909bSRuslan Ermilov.Bl -tag -width indent -compact
1222ebccf1e3SJoseph Koshy.It Li buffer-release
1223ebccf1e3SJoseph KoshyCount buffer release messages sent.
1224ebccf1e3SJoseph Koshy.It Li command
1225ebccf1e3SJoseph KoshyCount command messages sent.
1226ebccf1e3SJoseph Koshy.It Li data
1227ebccf1e3SJoseph KoshyCount data messages sent.
1228ebccf1e3SJoseph Koshy.It Li nop
1229ebccf1e3SJoseph KoshyCount nop messages sent.
1230ebccf1e3SJoseph Koshy.El
12319abe909bSRuslan Ermilov.Pp
1232ebccf1e3SJoseph KoshyThe default is to count all types of messages.
1233ebccf1e3SJoseph Koshy.El
1234ebccf1e3SJoseph Koshy.Ss Intel P6 PMCS
1235ebccf1e3SJoseph KoshyIntel P6 PMCs are present in Intel
1236ebccf1e3SJoseph Koshy.Tn "Pentium Pro" ,
1237ebccf1e3SJoseph Koshy.Tn "Pentium II" ,
12389abe909bSRuslan Ermilov.Tn Celeron ,
1239ebccf1e3SJoseph Koshy.Tn "Pentium III"
1240ebccf1e3SJoseph Koshyand
1241ebccf1e3SJoseph Koshy.Tn "Pentium M"
1242ebccf1e3SJoseph Koshyprocessors.
1243ebccf1e3SJoseph Koshy.Pp
1244ebccf1e3SJoseph KoshyThese CPUs have two counters.
1245ebccf1e3SJoseph KoshySome events may only be used on specific counters and some events are
1246ebccf1e3SJoseph Koshydefined only on specific processor models.
1247ebccf1e3SJoseph Koshy.Pp
1248ebccf1e3SJoseph KoshyThese PMCs are documented in
1249ebccf1e3SJoseph Koshy.Rs
1250ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
1251ebccf1e3SJoseph Koshy.%T "Volume 3: System Programming Guide"
1252ebccf1e3SJoseph Koshy.%N "Order Number 245472-012"
1253ebccf1e3SJoseph Koshy.%D 2003
1254ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
1255ebccf1e3SJoseph Koshy.Re
1256ebccf1e3SJoseph Koshy.Pp
125767edd229SJoseph KoshySome of these events are affected by processor errata described in
125867edd229SJoseph Koshy.Rs
125967edd229SJoseph Koshy.%B "Intel(R) Pentium(R) III Processor Specification Update"
126067edd229SJoseph Koshy.%N "Document Number: 244453-054"
126167edd229SJoseph Koshy.%D "April 2005"
126267edd229SJoseph Koshy.%Q "Intel Corporation"
126367edd229SJoseph Koshy.Re
126467edd229SJoseph Koshy.Pp
1265ebccf1e3SJoseph KoshyEvent specifiers for Intel P6 PMCs can have the following common
1266ebccf1e3SJoseph Koshyqualifiers:
1267ebccf1e3SJoseph Koshy.Bl -tag -width indent
1268ebccf1e3SJoseph Koshy.It Li cmask= Ns Ar value
1269ebccf1e3SJoseph KoshyConfigure the PMC to increment only if the number of configured
1270ebccf1e3SJoseph Koshyevents measured in a cycle is greater than or equal to
1271ebccf1e3SJoseph Koshy.Ar value .
1272ebccf1e3SJoseph Koshy.It Li edge
1273ebccf1e3SJoseph KoshyConfigure the PMC to count the number of deasserted to asserted
1274ebccf1e3SJoseph Koshytransitions of the conditions expressed by the other qualifiers.
1275ebccf1e3SJoseph KoshyIf specified, the counter will increment only once whenever a
1276ebccf1e3SJoseph Koshycondition becomes true, irrespective of the number of clocks during
1277ebccf1e3SJoseph Koshywhich the condition remains true.
1278ebccf1e3SJoseph Koshy.It Li inv
1279ebccf1e3SJoseph KoshyInvert the sense of comparision when the
12809abe909bSRuslan Ermilov.Dq Li cmask
1281ebccf1e3SJoseph Koshyqualifier is present, making the counter increment when the number of
1282ebccf1e3SJoseph Koshyevents per cycle is less than the value specified by the
12839abe909bSRuslan Ermilov.Dq Li cmask
1284ebccf1e3SJoseph Koshyqualifier.
1285ebccf1e3SJoseph Koshy.It Li os
1286ebccf1e3SJoseph KoshyConfigure the PMC to count events happening at processor privilege
1287ebccf1e3SJoseph Koshylevel 0.
1288ebccf1e3SJoseph Koshy.It Li umask= Ns Ar value
1289ebccf1e3SJoseph KoshyThis qualifier is used to further qualify the event selected (see
1290ebccf1e3SJoseph Koshybelow).
1291ebccf1e3SJoseph Koshy.It Li usr
1292ebccf1e3SJoseph KoshyConfigure the PMC to count events occurring at privilege levels 1, 2
1293ebccf1e3SJoseph Koshyor 3.
1294ebccf1e3SJoseph Koshy.El
12959abe909bSRuslan Ermilov.Pp
1296ebccf1e3SJoseph KoshyIf neither of the
12979abe909bSRuslan Ermilov.Dq Li os
1298ebccf1e3SJoseph Koshyor
12999abe909bSRuslan Ermilov.Dq Li usr
1300ebccf1e3SJoseph Koshyqualifiers are specified, the default is to enable both.
1301ebccf1e3SJoseph Koshy.Pp
1302ebccf1e3SJoseph KoshyThe event specifiers supported by Intel P6 PMCs are:
1303ebccf1e3SJoseph Koshy.Bl -tag -width indent
1304ebccf1e3SJoseph Koshy.It Li p6-baclears
1305ebccf1e3SJoseph KoshyCount the number of times a static branch prediction was made by the
1306ebccf1e3SJoseph Koshybranch decoder because the BTB did not have a prediction.
1307ebccf1e3SJoseph Koshy.It Li p6-br-bac-missp-exec
1308ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1309ebccf1e3SJoseph KoshyCount the number of branch instructions executed that where
1310ebccf1e3SJoseph Koshymispredicted at the Front End (BAC).
1311ebccf1e3SJoseph Koshy.It Li p6-br-bogus
1312ebccf1e3SJoseph KoshyCount the number of bogus branches.
1313ebccf1e3SJoseph Koshy.It Li p6-br-call-exec
1314ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1315ebccf1e3SJoseph KoshyCount the number of call instructions executed.
1316ebccf1e3SJoseph Koshy.It Li p6-br-call-missp-exec
1317ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1318ebccf1e3SJoseph KoshyCount the number of call instructions executed that were mispredicted.
1319ebccf1e3SJoseph Koshy.It Li p6-br-cnd-exec
1320ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1321ebccf1e3SJoseph KoshyCount the number of conditional branch instructions executed.
1322ebccf1e3SJoseph Koshy.It Li p6-br-cnd-missp-exec
1323ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1324ebccf1e3SJoseph KoshyCount the number of conditional branch instructions executed that were
1325ebccf1e3SJoseph Koshymispredicted.
1326ebccf1e3SJoseph Koshy.It Li p6-br-ind-call-exec
1327ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1328ebccf1e3SJoseph KoshyCount the number of indirect call instructions executed.
1329ebccf1e3SJoseph Koshy.It Li p6-br-ind-exec
1330ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1331ebccf1e3SJoseph KoshyCount the number of indirect branch instructions executed.
1332ebccf1e3SJoseph Koshy.It Li p6-br-ind-missp-exec
1333ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1334ebccf1e3SJoseph KoshyCount the number of indirect branch instructions executed that were
1335ebccf1e3SJoseph Koshymispredicted.
1336ebccf1e3SJoseph Koshy.It Li p6-br-inst-decoded
1337ebccf1e3SJoseph KoshyCount the number of branch instructions decoded.
1338ebccf1e3SJoseph Koshy.It Li p6-br-inst-exec
1339ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1340ebccf1e3SJoseph KoshyCount the number of branch instructions executed but necessarily retired.
1341ebccf1e3SJoseph Koshy.It Li p6-br-inst-retired
1342ebccf1e3SJoseph KoshyCount the number of branch instructions retired.
1343ebccf1e3SJoseph Koshy.It Li p6-br-miss-pred-retired
1344ebccf1e3SJoseph KoshyCount the number of mispredicted branch instructions retired.
1345ebccf1e3SJoseph Koshy.It Li p6-br-miss-pred-taken-ret
1346ebccf1e3SJoseph KoshyCount the number of taken mispredicted branches retired.
1347ebccf1e3SJoseph Koshy.It Li p6-br-missp-exec
1348ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1349ebccf1e3SJoseph KoshyCount the number of branch instructions executed that were
1350ebccf1e3SJoseph Koshymispredicted at execution.
1351ebccf1e3SJoseph Koshy.It Li p6-br-ret-bac-missp-exec
1352ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1353ebccf1e3SJoseph KoshyCount the number of return instructions executed that were
1354ebccf1e3SJoseph Koshymispredicted at the Front End (BAC).
1355ebccf1e3SJoseph Koshy.It Li p6-br-ret-exec
1356ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1357ebccf1e3SJoseph KoshyCount the number of return instructions executed.
1358ebccf1e3SJoseph Koshy.It Li p6-br-ret-missp-exec
1359ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1360ebccf1e3SJoseph KoshyCount the number of return instructions executed that were
1361ebccf1e3SJoseph Koshymispredicted at execution.
1362ebccf1e3SJoseph Koshy.It Li p6-br-taken-retired
1363ebccf1e3SJoseph KoshyCount the number of taken branches retired.
1364ebccf1e3SJoseph Koshy.It Li p6-btb-misses
1365ebccf1e3SJoseph KoshyCount the number of branches for which the BTB did not produce a
1366ebccf1e3SJoseph Koshyprediction.
1367ebccf1e3SJoseph Koshy.It Li p6-bus-bnr-drv
1368ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1369ebccf1e3SJoseph Koshydriving the BNR# pin.
1370ebccf1e3SJoseph Koshy.It Li p6-bus-data-rcv
1371ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1372ebccf1e3SJoseph Koshyreceiving data.
1373ebccf1e3SJoseph Koshy.It Li p6-bus-drdy-clocks Op Li ,umask= Ns Ar qualifier
1374ebccf1e3SJoseph KoshyCount the number of clocks during which DRDY# is asserted.
1375ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1376ebccf1e3SJoseph Koshyfollowing keywords:
13779abe909bSRuslan Ermilov.Pp
1378ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1379ebccf1e3SJoseph Koshy.It Li any
1380ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1381ebccf1e3SJoseph Koshy.It Li self
1382ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1383ebccf1e3SJoseph Koshy.El
13849abe909bSRuslan Ermilov.Pp
1385ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1386ebccf1e3SJoseph Koshy.It Li p6-bus-hit-drv
1387ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1388ebccf1e3SJoseph Koshydriving the HIT# pin.
1389ebccf1e3SJoseph Koshy.It Li p6-bus-hitm-drv
1390ebccf1e3SJoseph KoshyCount the number of bus clock cycles during which this processor is
1391ebccf1e3SJoseph Koshydriving the HITM# pin.
1392ebccf1e3SJoseph Koshy.It Li p6-bus-lock-clocks Op Li ,umask= Ns Ar qualifier
1393ebccf1e3SJoseph KoshyCount the number of clocks during with LOCK# is asserted on the
1394ebccf1e3SJoseph Koshyexternal system bus.
1395ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1396ebccf1e3SJoseph Koshykeywords:
13979abe909bSRuslan Ermilov.Pp
1398ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1399ebccf1e3SJoseph Koshy.It Li any
1400ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1401ebccf1e3SJoseph Koshy.It Li self
1402ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1403ebccf1e3SJoseph Koshy.El
14049abe909bSRuslan Ermilov.Pp
1405ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1406ebccf1e3SJoseph Koshy.It Li p6-bus-req-outstanding
1407ebccf1e3SJoseph KoshyCount the number of bus requests outstanding in any given cycle.
1408ebccf1e3SJoseph Koshy.It Li p6-bus-snoop-stall
1409ebccf1e3SJoseph KoshyCount the number of clock cycles during which the bus is snoop stalled.
1410ebccf1e3SJoseph Koshy.It Li p6-bus-tran-any Op Li ,umask= Ns Ar qualifier
1411ebccf1e3SJoseph KoshyCount the number of completed bus transactions of any kind.
1412ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1413ebccf1e3SJoseph Koshykeywords:
14149abe909bSRuslan Ermilov.Pp
1415ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1416ebccf1e3SJoseph Koshy.It Li any
1417ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1418ebccf1e3SJoseph Koshy.It Li self
1419ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1420ebccf1e3SJoseph Koshy.El
14219abe909bSRuslan Ermilov.Pp
1422ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1423ebccf1e3SJoseph Koshy.It Li p6-bus-tran-brd Op Li ,umask= Ns Ar qualifier
1424ebccf1e3SJoseph KoshyCount the number of burst read transactions.
1425ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1426ebccf1e3SJoseph Koshykeywords:
14279abe909bSRuslan Ermilov.Pp
1428ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1429ebccf1e3SJoseph Koshy.It Li any
1430ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1431ebccf1e3SJoseph Koshy.It Li self
1432ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1433ebccf1e3SJoseph Koshy.El
14349abe909bSRuslan Ermilov.Pp
1435ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1436ebccf1e3SJoseph Koshy.It Li p6-bus-tran-burst Op Li ,umask= Ns Ar qualifier
1437ebccf1e3SJoseph KoshyCount the number of completed burst transactions.
1438ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1439ebccf1e3SJoseph Koshykeywords:
14409abe909bSRuslan Ermilov.Pp
1441ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1442ebccf1e3SJoseph Koshy.It Li any
1443ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1444ebccf1e3SJoseph Koshy.It Li self
1445ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1446ebccf1e3SJoseph Koshy.El
14479abe909bSRuslan Ermilov.Pp
1448ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1449ebccf1e3SJoseph Koshy.It Li p6-bus-tran-def Op Li ,umask= Ns Ar qualifier
1450ebccf1e3SJoseph KoshyCount the number of completed deferred transactions.
1451ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1452ebccf1e3SJoseph Koshykeywords:
14539abe909bSRuslan Ermilov.Pp
1454ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1455ebccf1e3SJoseph Koshy.It Li any
1456ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1457ebccf1e3SJoseph Koshy.It Li self
1458ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1459ebccf1e3SJoseph Koshy.El
14609abe909bSRuslan Ermilov.Pp
1461ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1462ebccf1e3SJoseph Koshy.It Li p6-bus-tran-ifetch Op Li ,umask= Ns Ar qualifier
1463ebccf1e3SJoseph KoshyCount the number of completed instruction fetch transactions.
1464ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1465ebccf1e3SJoseph Koshykeywords:
14669abe909bSRuslan Ermilov.Pp
1467ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1468ebccf1e3SJoseph Koshy.It Li any
1469ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1470ebccf1e3SJoseph Koshy.It Li self
1471ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1472ebccf1e3SJoseph Koshy.El
14739abe909bSRuslan Ermilov.Pp
1474ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1475ebccf1e3SJoseph Koshy.It Li p6-bus-tran-inval Op Li ,umask= Ns Ar qualifier
1476ebccf1e3SJoseph KoshyCount the number of completed invalidate transactions.
1477ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1478ebccf1e3SJoseph Koshykeywords:
14799abe909bSRuslan Ermilov.Pp
1480ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1481ebccf1e3SJoseph Koshy.It Li any
1482ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1483ebccf1e3SJoseph Koshy.It Li self
1484ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1485ebccf1e3SJoseph Koshy.El
14869abe909bSRuslan Ermilov.Pp
1487ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1488ebccf1e3SJoseph Koshy.It Li p6-bus-tran-mem Op Li ,umask= Ns Ar qualifier
1489ebccf1e3SJoseph KoshyCount the number of completed memory transactions.
1490ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1491ebccf1e3SJoseph Koshykeywords:
14929abe909bSRuslan Ermilov.Pp
1493ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1494ebccf1e3SJoseph Koshy.It Li any
1495ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1496ebccf1e3SJoseph Koshy.It Li self
1497ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1498ebccf1e3SJoseph Koshy.El
14999abe909bSRuslan Ermilov.Pp
1500ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1501ebccf1e3SJoseph Koshy.It Li p6-bus-tran-pwr Op Li ,umask= Ns Ar qualifier
1502ebccf1e3SJoseph KoshyCount the number of completed partial write transactions.
1503ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1504ebccf1e3SJoseph Koshykeywords:
15059abe909bSRuslan Ermilov.Pp
1506ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1507ebccf1e3SJoseph Koshy.It Li any
1508ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1509ebccf1e3SJoseph Koshy.It Li self
1510ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1511ebccf1e3SJoseph Koshy.El
15129abe909bSRuslan Ermilov.Pp
1513ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1514ebccf1e3SJoseph Koshy.It Li p6-bus-tran-rfo Op Li ,umask= Ns Ar qualifier
1515ebccf1e3SJoseph KoshyCount the number of completed read-for-ownership transactions.
1516ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1517ebccf1e3SJoseph Koshykeywords:
15189abe909bSRuslan Ermilov.Pp
1519ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1520ebccf1e3SJoseph Koshy.It Li any
1521ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1522ebccf1e3SJoseph Koshy.It Li self
1523ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1524ebccf1e3SJoseph Koshy.El
15259abe909bSRuslan Ermilov.Pp
1526ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1527ebccf1e3SJoseph Koshy.It Li p6-bus-trans-io Op Li ,umask= Ns Ar qualifier
1528ebccf1e3SJoseph KoshyCount the number of completed I/O transactions.
1529ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1530ebccf1e3SJoseph Koshykeywords:
15319abe909bSRuslan Ermilov.Pp
1532ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1533ebccf1e3SJoseph Koshy.It Li any
1534ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1535ebccf1e3SJoseph Koshy.It Li self
1536ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1537ebccf1e3SJoseph Koshy.El
15389abe909bSRuslan Ermilov.Pp
1539ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1540ebccf1e3SJoseph Koshy.It Li p6-bus-trans-p Op Li ,umask= Ns Ar qualifier
1541ebccf1e3SJoseph KoshyCount the number of completed partial transactions.
1542ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1543ebccf1e3SJoseph Koshykeywords:
15449abe909bSRuslan Ermilov.Pp
1545ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1546ebccf1e3SJoseph Koshy.It Li any
1547ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1548ebccf1e3SJoseph Koshy.It Li self
1549ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1550ebccf1e3SJoseph Koshy.El
15519abe909bSRuslan Ermilov.Pp
1552ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1553ebccf1e3SJoseph Koshy.It Li p6-bus-trans-wb Op Li ,umask= Ns Ar qualifier
1554ebccf1e3SJoseph KoshyCount the number of completed write-back transactions.
1555ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises one of the following
1556ebccf1e3SJoseph Koshykeywords:
15579abe909bSRuslan Ermilov.Pp
1558ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1559ebccf1e3SJoseph Koshy.It Li any
1560ebccf1e3SJoseph KoshyCount transactions generated by any agent on the bus.
1561ebccf1e3SJoseph Koshy.It Li self
1562ebccf1e3SJoseph KoshyCount transactions generated by this processor.
1563ebccf1e3SJoseph Koshy.El
15649abe909bSRuslan Ermilov.Pp
1565ebccf1e3SJoseph KoshyThe default is to count operations generated by this processor.
1566ebccf1e3SJoseph Koshy.It Li p6-cpu-clk-unhalted
1567ebccf1e3SJoseph KoshyCount the number of cycles during with the processor was not halted.
1568ebccf1e3SJoseph Koshy.Pp
1569ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1570ebccf1e3SJoseph KoshyCount the number of cycles during with the processor was not halted
1571ebccf1e3SJoseph Koshyand not in a thermal trip.
1572ebccf1e3SJoseph Koshy.It Li p6-cycles-div-busy
1573ebccf1e3SJoseph KoshyCount the number of cycles during which the divider is busy and cannot
1574ebccf1e3SJoseph Koshyaccept new divides.
1575ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1576ebccf1e3SJoseph Koshy.It Li p6-cycles-in-pending-and-masked
1577ebccf1e3SJoseph KoshyCount the number of processor cycles for which interrupts were
1578ebccf1e3SJoseph Koshydisabled and interrupts were pending.
1579ebccf1e3SJoseph Koshy.It Li p6-cycles-int-masked
1580ebccf1e3SJoseph KoshyCount the number of processor cycles for which interrupts were
1581ebccf1e3SJoseph Koshydisabled.
1582ebccf1e3SJoseph Koshy.It Li p6-data-mem-refs
1583ebccf1e3SJoseph KoshyCount all loads and all stores using any memory type, including
1584ebccf1e3SJoseph Koshyinternal retries.
15859abe909bSRuslan ErmilovEach part of a split store is counted separately.
1586ebccf1e3SJoseph Koshy.It Li p6-dcu-lines-in
1587ebccf1e3SJoseph KoshyCount the total lines allocated in the data cache unit.
1588ebccf1e3SJoseph Koshy.It Li p6-dcu-m-lines-in
1589ebccf1e3SJoseph KoshyCount the number of M state lines allocated in the data cache unit.
1590ebccf1e3SJoseph Koshy.It Li p6-dcu-m-lines-out
1591ebccf1e3SJoseph KoshyCount the number of M state lines evicted from the data cache unit.
1592ebccf1e3SJoseph Koshy.It Li p6-dcu-miss-outstanding
1593ebccf1e3SJoseph KoshyCount the weighted number of cycles while a data cache unit miss is
1594ebccf1e3SJoseph Koshyoutstanding, incremented by the number of outstanding cache misses at
1595ebccf1e3SJoseph Koshyany time.
1596ebccf1e3SJoseph Koshy.It Li p6-div
1597ebccf1e3SJoseph KoshyCount the number of floating point multiplies.
1598ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
1599ebccf1e3SJoseph Koshy.It Li p6-emon-esp-uops
1600ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1601ebccf1e3SJoseph KoshyCount the total number of micro-ops.
1602ebccf1e3SJoseph Koshy.It Li p6-emon-est-trans Op Li ,umask= Ns Ar qualifier
1603ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1604ebccf1e3SJoseph KoshyCount the number of
1605ebccf1e3SJoseph Koshy.Tn "Enhanced Intel SpeedStep"
1606ebccf1e3SJoseph Koshytransitions.
1607ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and can be one of the
1608ebccf1e3SJoseph Koshyfollowing keywords:
16099abe909bSRuslan Ermilov.Pp
1610ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1611ebccf1e3SJoseph Koshy.It Li all
1612ebccf1e3SJoseph KoshyCount all transitions.
1613ebccf1e3SJoseph Koshy.It Li freq
1614ebccf1e3SJoseph KoshyCount only frequency transitions.
1615ebccf1e3SJoseph Koshy.El
16169abe909bSRuslan Ermilov.Pp
1617ebccf1e3SJoseph KoshyThe default is to count all transitions.
1618ebccf1e3SJoseph Koshy.It Li p6-emon-fused-uops-ret Op Li ,umask= Ns Ar qualifier
1619ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1620ebccf1e3SJoseph KoshyCount the number of retired fused micro-ops.
1621ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and may be one of the
1622ebccf1e3SJoseph Koshyfollowing keywords:
16239abe909bSRuslan Ermilov.Pp
1624ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1625ebccf1e3SJoseph Koshy.It Li all
1626ebccf1e3SJoseph KoshyCount all fused micro-ops.
1627ebccf1e3SJoseph Koshy.It Li loadop
1628ebccf1e3SJoseph KoshyCount only load and op micro-ops.
1629ebccf1e3SJoseph Koshy.It Li stdsta
1630ebccf1e3SJoseph KoshyCount only STD/STA micro-ops.
1631ebccf1e3SJoseph Koshy.El
16329abe909bSRuslan Ermilov.Pp
1633ebccf1e3SJoseph KoshyThe default is to count all fused micro-ops.
1634ebccf1e3SJoseph Koshy.It Li p6-emon-kni-comp-inst-ret
1635ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1636ebccf1e3SJoseph KoshyCount the number of SSE computational instructions retired.
1637ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1638ebccf1e3SJoseph Koshyfollowing keywords:
16399abe909bSRuslan Ermilov.Pp
1640ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1641ebccf1e3SJoseph Koshy.It Li packed-and-scalar
1642ebccf1e3SJoseph KoshyCount packed and scalar operations.
1643ebccf1e3SJoseph Koshy.It Li scalar
1644ebccf1e3SJoseph KoshyCount scalar operations only.
1645ebccf1e3SJoseph Koshy.El
16469abe909bSRuslan Ermilov.Pp
1647ebccf1e3SJoseph KoshyThe default is to count packed and scalar operations.
1648ebccf1e3SJoseph Koshy.It Li p6-emon-kni-inst-retired Op Li ,umask= Ns Ar qualifier
1649ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1650ebccf1e3SJoseph KoshyCount the number of SSE instructions retired.
1651ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1652ebccf1e3SJoseph Koshyfollowing keywords:
16539abe909bSRuslan Ermilov.Pp
1654ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1655ebccf1e3SJoseph Koshy.It Li packed-and-scalar
1656ebccf1e3SJoseph KoshyCount packed and scalar operations.
1657ebccf1e3SJoseph Koshy.It Li scalar
1658ebccf1e3SJoseph KoshyCount scalar operations only.
1659ebccf1e3SJoseph Koshy.El
16609abe909bSRuslan Ermilov.Pp
1661ebccf1e3SJoseph KoshyThe default is to count packed and scalar operations.
1662ebccf1e3SJoseph Koshy.It Li p6-emon-kni-pref-dispatched Op Li ,umask= Ns Ar qualifier
1663ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1664ebccf1e3SJoseph KoshyCount the number of SSE prefetch or weakly ordered instructions
1665ebccf1e3SJoseph Koshydispatched (including speculative prefetches).
1666ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1667ebccf1e3SJoseph Koshyfollowing keywords:
16689abe909bSRuslan Ermilov.Pp
1669ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1670ebccf1e3SJoseph Koshy.It Li nta
1671ebccf1e3SJoseph KoshyCount non-temporal prefetches.
1672ebccf1e3SJoseph Koshy.It Li t1
1673ebccf1e3SJoseph KoshyCount prefetches to L1.
1674ebccf1e3SJoseph Koshy.It Li t2
1675ebccf1e3SJoseph KoshyCount prefetches to L2.
1676ebccf1e3SJoseph Koshy.It Li wos
1677ebccf1e3SJoseph KoshyCount weakly ordered stores.
1678ebccf1e3SJoseph Koshy.El
16799abe909bSRuslan Ermilov.Pp
1680ebccf1e3SJoseph KoshyThe default is to count non-temporal prefetches.
1681ebccf1e3SJoseph Koshy.It Li p6-emon-kni-pref-miss Op Li ,umask= Ns Ar qualifier
1682ebccf1e3SJoseph Koshy.Pq Tn "Pentium III"
1683ebccf1e3SJoseph KoshyCount the number of prefetch or weakly ordered instructions that miss
1684ebccf1e3SJoseph Koshyall caches.
1685ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1686ebccf1e3SJoseph Koshyfollowing keywords:
16879abe909bSRuslan Ermilov.Pp
1688ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1689ebccf1e3SJoseph Koshy.It Li nta
1690ebccf1e3SJoseph KoshyCount non-temporal prefetches.
1691ebccf1e3SJoseph Koshy.It Li t1
1692ebccf1e3SJoseph KoshyCount prefetches to L1.
1693ebccf1e3SJoseph Koshy.It Li t2
1694ebccf1e3SJoseph KoshyCount prefetches to L2.
1695ebccf1e3SJoseph Koshy.It Li wos
1696ebccf1e3SJoseph KoshyCount weakly ordered stores.
1697ebccf1e3SJoseph Koshy.El
16989abe909bSRuslan Ermilov.Pp
1699ebccf1e3SJoseph KoshyThe default is to count non-temporal prefetches.
1700ebccf1e3SJoseph Koshy.It Li p6-emon-pref-rqsts-dn
1701ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1702ebccf1e3SJoseph KoshyCount the number of downward prefetches issued.
1703ebccf1e3SJoseph Koshy.It Li p6-emon-pref-rqsts-up
1704ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1705ebccf1e3SJoseph KoshyCount the number of upward prefetches issued.
1706ebccf1e3SJoseph Koshy.It Li p6-emon-simd-instr-retired
1707ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1708ebccf1e3SJoseph KoshyCount the number of retired
1709ebccf1e3SJoseph Koshy.Tn MMX
1710ebccf1e3SJoseph Koshyinstructions.
1711ebccf1e3SJoseph Koshy.It Li p6-emon-sse-sse2-comp-inst-retired Op Li ,umask= Ns Ar qualifier
1712ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1713ebccf1e3SJoseph KoshyCount the number of computational SSE instructions retired.
1714ebccf1e3SJoseph KoshyAn additional qualifier may be specified and can be one of the
1715ebccf1e3SJoseph Koshyfollowing keywords:
17169abe909bSRuslan Ermilov.Pp
1717ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1718ebccf1e3SJoseph Koshy.It Li sse-packed-single
1719ebccf1e3SJoseph KoshyCount SSE packed-single instructions.
1720ebccf1e3SJoseph Koshy.It Li sse-scalar-single
1721ebccf1e3SJoseph KoshyCount SSE scalar-single instructions.
1722ebccf1e3SJoseph Koshy.It Li sse2-packed-double
1723ebccf1e3SJoseph KoshyCount SSE2 packed-double instructions.
1724ebccf1e3SJoseph Koshy.It Li sse2-scalar-double
1725ebccf1e3SJoseph KoshyCount SSE2 scalar-double instructions.
1726ebccf1e3SJoseph Koshy.El
17279abe909bSRuslan Ermilov.Pp
1728ebccf1e3SJoseph KoshyThe default is to count SSE packed-single instructions.
1729ebccf1e3SJoseph Koshy.It Li p6-emon-sse-sse2-inst-retired Op Li ,umask= Ns Ar qualifer
1730ebccf1e3SJoseph Koshy.Pp
1731ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1732ebccf1e3SJoseph KoshyCount the number of SSE instructions retired.
1733ebccf1e3SJoseph KoshyAn additional qualifier can be specified, and can be one of the
1734ebccf1e3SJoseph Koshyfollowing keywords:
17359abe909bSRuslan Ermilov.Pp
1736ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1737ebccf1e3SJoseph Koshy.It Li sse-packed-single
1738ebccf1e3SJoseph KoshyCount SSE packed-single instructions.
1739ebccf1e3SJoseph Koshy.It Li sse-packed-single-scalar-single
1740ebccf1e3SJoseph KoshyCount SSE packed-single and scalar-single instructions.
1741ebccf1e3SJoseph Koshy.It Li sse2-packed-double
1742ebccf1e3SJoseph KoshyCount SSE2 packed-double instructions.
1743ebccf1e3SJoseph Koshy.It Li sse2-scalar-double
1744ebccf1e3SJoseph KoshyCount SSE2 scalar-double instructions.
1745ebccf1e3SJoseph Koshy.El
17469abe909bSRuslan Ermilov.Pp
1747ebccf1e3SJoseph KoshyThe default is to count SSE packed-single instructions.
1748ebccf1e3SJoseph Koshy.It Li p6-emon-synch-uops
1749ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1750ebccf1e3SJoseph KoshyCount the number of sync micro-ops.
1751ebccf1e3SJoseph Koshy.It Li p6-emon-thermal-trip
1752ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1753ebccf1e3SJoseph KoshyCount the duration or occurrences of thermal trips.
1754ebccf1e3SJoseph KoshyUse the
17559abe909bSRuslan Ermilov.Dq Li edge
1756ebccf1e3SJoseph Koshyqualifier to count occurrences of thermal trips.
1757ebccf1e3SJoseph Koshy.It Li p6-emon-unfusion
1758ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1759ebccf1e3SJoseph KoshyCount the number of unfusion events in the reorder buffer.
1760ebccf1e3SJoseph Koshy.It Li p6-flops
1761ebccf1e3SJoseph KoshyCount the number of computational floating point operations retired.
1762ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1763ebccf1e3SJoseph Koshy.It Li p6-fp-assist
1764ebccf1e3SJoseph KoshyCount the number of floating point exceptions handled by microcode.
1765ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
1766ebccf1e3SJoseph Koshy.It Li p6-fp-comps-ops-exe
1767ebccf1e3SJoseph KoshyCount the number of computation floating point operations executed.
1768ebccf1e3SJoseph KoshyThis event is only allocated on counter 0.
1769ebccf1e3SJoseph Koshy.It Li p6-fp-mmx-trans Op Li ,umask= Ns Ar qualifier
1770ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
1771ebccf1e3SJoseph KoshyCount the number of transitions between MMX and floating-point
1772ebccf1e3SJoseph Koshyinstructions.
1773ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises one of the
1774ebccf1e3SJoseph Koshyfollowing keywords:
17759abe909bSRuslan Ermilov.Pp
1776ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1777ebccf1e3SJoseph Koshy.It Li mmxtofp
1778ebccf1e3SJoseph KoshyCount transitions from MMX instructions to floating-point instructions.
1779ebccf1e3SJoseph Koshy.It Li fptommx
1780ebccf1e3SJoseph KoshyCount transitions from floating-point instructions to MMX instructions.
1781ebccf1e3SJoseph Koshy.El
17829abe909bSRuslan Ermilov.Pp
1783ebccf1e3SJoseph KoshyThe default is to count MMX to floating-point transitions.
1784ebccf1e3SJoseph Koshy.It Li p6-hw-int-rx
1785ebccf1e3SJoseph KoshyCount the number of hardware interrupts received.
1786ebccf1e3SJoseph Koshy.It Li p6-ifu-fetch
1787ebccf1e3SJoseph KoshyCount the number of instruction fetches, both cacheable and non-cacheable.
1788ebccf1e3SJoseph Koshy.It Li p6-ifu-fetch-miss
1789ebccf1e3SJoseph KoshyCount the number of instruction fetch misses (i.e., those that produce
1790ebccf1e3SJoseph Koshymemory accesses).
1791ebccf1e3SJoseph Koshy.It Li p6-ifu-mem-stall
1792ebccf1e3SJoseph KoshyCount the number of cycles instruction fetch is stalled for any reason.
1793ebccf1e3SJoseph Koshy.It Li p6-ild-stall
1794ebccf1e3SJoseph KoshyCount the number of cycles the instruction length decoder is stalled.
1795ebccf1e3SJoseph Koshy.It Li p6-inst-decoded
1796ebccf1e3SJoseph KoshyCount the number of instructions decoded.
1797ebccf1e3SJoseph Koshy.It Li p6-inst-retired
1798ebccf1e3SJoseph KoshyCount the number of instructions retired.
1799ebccf1e3SJoseph Koshy.It Li p6-itlb-miss
1800ebccf1e3SJoseph KoshyCount the number of instruction TLB misses.
1801ebccf1e3SJoseph Koshy.It Li p6-l2-ads
1802ebccf1e3SJoseph KoshyCount the number of L2 address strobes.
1803ebccf1e3SJoseph Koshy.It Li p6-l2-dbus-busy
1804ebccf1e3SJoseph KoshyCount the number of cycles during which the L2 cache data bus was busy.
1805ebccf1e3SJoseph Koshy.It Li p6-l2-dbus-busy-rd
1806ebccf1e3SJoseph KoshyCount the number of cycles during which the L2 cache data bus was busy
1807ebccf1e3SJoseph Koshytransferring read data from L2 to the processor.
1808ebccf1e3SJoseph Koshy.It Li p6-l2-ifetch Op Li ,umask= Ns Ar qualifier
1809ebccf1e3SJoseph KoshyCount the number of L2 instruction fetches.
1810ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1811ebccf1e3SJoseph Koshykeywords separated by
18129abe909bSRuslan Ermilov.Ql +
1813ebccf1e3SJoseph Koshycharacters:
18149abe909bSRuslan Ermilov.Pp
1815ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1816ebccf1e3SJoseph Koshy.It Li e
1817ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1818ebccf1e3SJoseph Koshy.It Li i
1819ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1820ebccf1e3SJoseph Koshy.It Li m
1821ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1822ebccf1e3SJoseph Koshy.It Li s
1823ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1824ebccf1e3SJoseph Koshy.El
18259abe909bSRuslan Ermilov.Pp
1826ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
1827ebccf1e3SJoseph Koshy.It Li p6-l2-ld Op Li ,umask= Ns Ar qualifier
1828ebccf1e3SJoseph KoshyCount the number of L2 data loads.
1829ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1830ebccf1e3SJoseph Koshykeywords separated by
18319abe909bSRuslan Ermilov.Ql +
1832ebccf1e3SJoseph Koshycharacters:
18339abe909bSRuslan Ermilov.Pp
1834ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1835ebccf1e3SJoseph Koshy.It Li both
1836ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1837ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1838ebccf1e3SJoseph Koshy.It Li e
1839ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1840ebccf1e3SJoseph Koshy.It Li hw
1841ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1842ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1843ebccf1e3SJoseph Koshy.It Li i
1844ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1845ebccf1e3SJoseph Koshy.It Li m
1846ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1847ebccf1e3SJoseph Koshy.It Li nonhw
1848ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1849ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1850ebccf1e3SJoseph Koshy.It Li s
1851ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1852ebccf1e3SJoseph Koshy.El
18539abe909bSRuslan Ermilov.Pp
1854ebccf1e3SJoseph KoshyThe default on processors other than
1855ebccf1e3SJoseph Koshy.Tn "Pentium M"
1856ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1857ebccf1e3SJoseph KoshyThe default on
1858ebccf1e3SJoseph Koshy.Tn "Pentium M"
1859ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1860ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
186167edd229SJoseph Koshy.Pq Errata
186267edd229SJoseph KoshyThis event is affected by processor errata E53.
1863ebccf1e3SJoseph Koshy.It Li p6-l2-lines-in Op Li ,umask= Ns Ar qualifier
1864ebccf1e3SJoseph KoshyCount the number of L2 lines allocated.
1865ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1866ebccf1e3SJoseph Koshykeywords separated by
18679abe909bSRuslan Ermilov.Ql +
1868ebccf1e3SJoseph Koshycharacters:
18699abe909bSRuslan Ermilov.Pp
1870ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1871ebccf1e3SJoseph Koshy.It Li both
1872ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1873ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1874ebccf1e3SJoseph Koshy.It Li e
1875ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1876ebccf1e3SJoseph Koshy.It Li hw
1877ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1878ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1879ebccf1e3SJoseph Koshy.It Li i
1880ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1881ebccf1e3SJoseph Koshy.It Li m
1882ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1883ebccf1e3SJoseph Koshy.It Li nonhw
1884ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1885ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1886ebccf1e3SJoseph Koshy.It Li s
1887ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1888ebccf1e3SJoseph Koshy.El
18899abe909bSRuslan Ermilov.Pp
1890ebccf1e3SJoseph KoshyThe default on processors other than
1891ebccf1e3SJoseph Koshy.Tn "Pentium M"
1892ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1893ebccf1e3SJoseph KoshyThe default on
1894ebccf1e3SJoseph Koshy.Tn "Pentium M"
1895ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1896ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
189767edd229SJoseph Koshy.Pq Errata
189867edd229SJoseph KoshyThis event is affected by processor errata E45.
1899ebccf1e3SJoseph Koshy.It Li p6-l2-lines-out Op Li ,umask= Ns Ar qualifier
1900ebccf1e3SJoseph KoshyCount the number of L2 lines evicted.
1901ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1902ebccf1e3SJoseph Koshykeywords separated by
19039abe909bSRuslan Ermilov.Ql +
1904ebccf1e3SJoseph Koshycharacters:
19059abe909bSRuslan Ermilov.Pp
1906ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1907ebccf1e3SJoseph Koshy.It Li both
1908ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1909ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1910ebccf1e3SJoseph Koshy.It Li e
1911ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1912ebccf1e3SJoseph Koshy.It Li hw
1913ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1914ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1915ebccf1e3SJoseph Koshy.It Li i
1916ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1917ebccf1e3SJoseph Koshy.It Li m
1918ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1919ebccf1e3SJoseph Koshy.It Li nonhw
1920ebccf1e3SJoseph Koshy.Pq Tn "Pentium M" only
1921ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1922ebccf1e3SJoseph Koshy.It Li s
1923ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1924ebccf1e3SJoseph Koshy.El
19259abe909bSRuslan Ermilov.Pp
1926ebccf1e3SJoseph KoshyThe default on processors other than
1927ebccf1e3SJoseph Koshy.Tn "Pentium M"
1928ebccf1e3SJoseph Koshyprocessors is to count operations affecting all (MESI) state lines.
1929ebccf1e3SJoseph KoshyThe default on
1930ebccf1e3SJoseph Koshy.Tn "Pentium M"
1931ebccf1e3SJoseph Koshyprocessors is to count both hardware-prefetched and
1932ebccf1e3SJoseph Koshynon-hardware-prefetch operations on all (MESI) state lines.
193367edd229SJoseph Koshy.Pq Errata
193467edd229SJoseph KoshyThis event is affected by processor errata E45.
1935ebccf1e3SJoseph Koshy.It Li p6-l2-m-lines-inm
1936ebccf1e3SJoseph KoshyCount the number of modified lines allocated in L2 cache.
1937ebccf1e3SJoseph Koshy.It Li p6-l2-m-lines-outm Op Li ,umask= Ns Ar qualifier
1938ebccf1e3SJoseph KoshyCount the number of L2 M-state lines evicted.
1939ebccf1e3SJoseph Koshy.Pp
1940ebccf1e3SJoseph Koshy.Pq Tn "Pentium M"
1941ebccf1e3SJoseph KoshyOn these processors an additional qualifier may be specified and
1942ebccf1e3SJoseph Koshycomprises a list of the following keywords separated by
19439abe909bSRuslan Ermilov.Ql +
1944ebccf1e3SJoseph Koshycharacters:
19459abe909bSRuslan Ermilov.Pp
1946ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1947ebccf1e3SJoseph Koshy.It Li both
1948ebccf1e3SJoseph KoshyCount both hardware-prefetched lines and non-hardware-prefetched lines.
1949ebccf1e3SJoseph Koshy.It Li hw
1950ebccf1e3SJoseph KoshyCount hardware-prefetched lines only.
1951ebccf1e3SJoseph Koshy.It Li nonhw
1952ebccf1e3SJoseph KoshyExclude hardware-prefetched lines.
1953ebccf1e3SJoseph Koshy.El
19549abe909bSRuslan Ermilov.Pp
1955ebccf1e3SJoseph KoshyThe default is to count both hardware-prefetched and
1956ebccf1e3SJoseph Koshynon-hardware-prefetch operations.
195767edd229SJoseph Koshy.Pq Errata
195867edd229SJoseph KoshyThis event is affected by processor errata E53.
1959ebccf1e3SJoseph Koshy.It Li p6-l2-rqsts Op Li ,umask= Ns Ar qualifier
1960ebccf1e3SJoseph KoshyCount the total number of L2 requests.
1961ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1962ebccf1e3SJoseph Koshykeywords separated by
19639abe909bSRuslan Ermilov.Ql +
1964ebccf1e3SJoseph Koshycharacters:
19659abe909bSRuslan Ermilov.Pp
1966ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1967ebccf1e3SJoseph Koshy.It Li e
1968ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1969ebccf1e3SJoseph Koshy.It Li i
1970ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1971ebccf1e3SJoseph Koshy.It Li m
1972ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1973ebccf1e3SJoseph Koshy.It Li s
1974ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1975ebccf1e3SJoseph Koshy.El
19769abe909bSRuslan Ermilov.Pp
1977ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
1978ebccf1e3SJoseph Koshy.It Li p6-l2-st
1979ebccf1e3SJoseph KoshyCount the number of L2 data stores.
1980ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of the following
1981ebccf1e3SJoseph Koshykeywords separated by
19829abe909bSRuslan Ermilov.Ql +
1983ebccf1e3SJoseph Koshycharacters:
19849abe909bSRuslan Ermilov.Pp
1985ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
1986ebccf1e3SJoseph Koshy.It Li e
1987ebccf1e3SJoseph KoshyCount operations affecting E (exclusive) state lines.
1988ebccf1e3SJoseph Koshy.It Li i
1989ebccf1e3SJoseph KoshyCount operations affecting I (invalid) state lines.
1990ebccf1e3SJoseph Koshy.It Li m
1991ebccf1e3SJoseph KoshyCount operations affecting M (modified) state lines.
1992ebccf1e3SJoseph Koshy.It Li s
1993ebccf1e3SJoseph KoshyCount operations affecting S (shared) state lines.
1994ebccf1e3SJoseph Koshy.El
19959abe909bSRuslan Ermilov.Pp
1996ebccf1e3SJoseph KoshyThe default is to count operations affecting all (MESI) state lines.
1997ebccf1e3SJoseph Koshy.It Li p6-ld-blocks
1998ebccf1e3SJoseph KoshyCount the number of load operations delayed due to store buffer blocks.
1999ebccf1e3SJoseph Koshy.It Li p6-misalign-mem-ref
2000ebccf1e3SJoseph KoshyCount the number of misaligned data memory references (crossing a 64
2001ebccf1e3SJoseph Koshybit boundary).
2002ebccf1e3SJoseph Koshy.It Li p6-mmx-assist
2003ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2004ebccf1e3SJoseph KoshyCount the number of MMX assists executed.
2005ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-exec
20069abe909bSRuslan Ermilov.Pq Tn Celeron , Tn "Pentium II"
2007ebccf1e3SJoseph KoshyCount the number of MMX instructions executed, except MOVQ and MOVD
2008ebccf1e3SJoseph Koshystores from register to memory.
2009ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-ret
2010ebccf1e3SJoseph Koshy.Pq Tn "Pentium II"
2011ebccf1e3SJoseph KoshyCount the number of MMX instructions retired.
2012ebccf1e3SJoseph Koshy.It Li p6-mmx-instr-type-exec Op Li ,umask= Ns Ar qualifier
2013ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2014ebccf1e3SJoseph KoshyCount the number of MMX instructions executed.
2015ebccf1e3SJoseph KoshyAn additional qualifier may be specified and comprises a list of
2016ebccf1e3SJoseph Koshythe following keywords separated by
20179abe909bSRuslan Ermilov.Ql +
2018ebccf1e3SJoseph Koshycharacters:
20199abe909bSRuslan Ermilov.Pp
2020ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2021ebccf1e3SJoseph Koshy.It Li pack
2022ebccf1e3SJoseph KoshyCount MMX pack operation instructions.
2023ebccf1e3SJoseph Koshy.It Li packed-arithmetic
2024ebccf1e3SJoseph KoshyCount MMX packed arithmetic instructions.
2025ebccf1e3SJoseph Koshy.It Li packed-logical
2026ebccf1e3SJoseph KoshyCount MMX packed logical instructions.
2027ebccf1e3SJoseph Koshy.It Li packed-multiply
2028ebccf1e3SJoseph KoshyCount MMX packed multiply instructions.
2029ebccf1e3SJoseph Koshy.It Li packed-shift
2030ebccf1e3SJoseph KoshyCount MMX packed shift instructions.
2031ebccf1e3SJoseph Koshy.It Li unpack
2032ebccf1e3SJoseph KoshyCount MMX unpack operation instructions.
2033ebccf1e3SJoseph Koshy.El
20349abe909bSRuslan Ermilov.Pp
2035ebccf1e3SJoseph KoshyThe default is to count all operations.
2036ebccf1e3SJoseph Koshy.It Li p6-mmx-sat-instr-exec
2037ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2038ebccf1e3SJoseph KoshyCount the number of MMX saturating instructions executed.
2039ebccf1e3SJoseph Koshy.It Li p6-mmx-uops-exec
2040ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2041ebccf1e3SJoseph KoshyCount the number of MMX micro-ops executed.
2042ebccf1e3SJoseph Koshy.It Li p6-mul
2043ebccf1e3SJoseph KoshyCount the number of floating point multiplies.
2044ebccf1e3SJoseph KoshyThis event is only allocated on counter 1.
2045ebccf1e3SJoseph Koshy.It Li p6-partial-rat-stalls
2046ebccf1e3SJoseph KoshyCount the number of cycles or events for partial stalls.
2047ebccf1e3SJoseph Koshy.It Li p6-resource-stalls
2048ebccf1e3SJoseph KoshyCount the number of cycles there was a resource related stall of any kind.
2049ebccf1e3SJoseph Koshy.It Li p6-ret-seg-renames
2050ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2051ebccf1e3SJoseph KoshyCount the number of segment register rename events retired.
2052ebccf1e3SJoseph Koshy.It Li p6-sb-drains
2053ebccf1e3SJoseph KoshyCount the number of cycles the store buffer is draining.
2054ebccf1e3SJoseph Koshy.It Li p6-seg-reg-renames Op Li ,umask= Ns Ar qualifier
2055ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2056ebccf1e3SJoseph KoshyCount the number of segment register renames.
2057ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises a list of the
2058ebccf1e3SJoseph Koshyfollowing keywords separated by
20599abe909bSRuslan Ermilov.Ql +
2060ebccf1e3SJoseph Koshycharacters:
20619abe909bSRuslan Ermilov.Pp
2062ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2063ebccf1e3SJoseph Koshy.It Li ds
2064ebccf1e3SJoseph KoshyCount renames for segment register DS.
2065ebccf1e3SJoseph Koshy.It Li es
2066ebccf1e3SJoseph KoshyCount renames for segment register ES.
2067ebccf1e3SJoseph Koshy.It Li fs
2068ebccf1e3SJoseph KoshyCount renames for segment register FS.
2069ebccf1e3SJoseph Koshy.It Li gs
2070ebccf1e3SJoseph KoshyCount renames for segment register GS.
2071ebccf1e3SJoseph Koshy.El
20729abe909bSRuslan Ermilov.Pp
2073ebccf1e3SJoseph KoshyThe default is to count operations affecting all segment registers.
2074ebccf1e3SJoseph Koshy.It Li p6-seg-rename-stalls
2075ebccf1e3SJoseph Koshy.Pq Tn "Pentium II" , Tn "Pentium III"
2076ebccf1e3SJoseph KoshyCount the number of segment register renaming stalls.
2077ebccf1e3SJoseph KoshyAn additional qualifier may be specified, and comprises a list of the
2078ebccf1e3SJoseph Koshyfollowing keywords separated by
20799abe909bSRuslan Ermilov.Ql +
2080ebccf1e3SJoseph Koshycharacters:
20819abe909bSRuslan Ermilov.Pp
2082ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2083ebccf1e3SJoseph Koshy.It Li ds
2084ebccf1e3SJoseph KoshyCount stalls for segment register DS.
2085ebccf1e3SJoseph Koshy.It Li es
2086ebccf1e3SJoseph KoshyCount stalls for segment register ES.
2087ebccf1e3SJoseph Koshy.It Li fs
2088ebccf1e3SJoseph KoshyCount stalls for segment register FS.
2089ebccf1e3SJoseph Koshy.It Li gs
2090ebccf1e3SJoseph KoshyCount stalls for segment register GS.
2091ebccf1e3SJoseph Koshy.El
20929abe909bSRuslan Ermilov.Pp
2093ebccf1e3SJoseph KoshyThe default is to count operations affecting all the segment registers.
2094ebccf1e3SJoseph Koshy.It Li p6-segment-reg-loads
2095ebccf1e3SJoseph KoshyCount the number of segment register loads.
2096ebccf1e3SJoseph Koshy.It Li p6-uops-retired
2097ebccf1e3SJoseph KoshyCount the number of micro-ops retired.
2098ebccf1e3SJoseph Koshy.El
2099ebccf1e3SJoseph Koshy.Ss Intel P4 PMCS
2100ebccf1e3SJoseph KoshyIntel P4 PMCs are present in Intel
2101ebccf1e3SJoseph Koshy.Tn "Pentium 4"
2102ebccf1e3SJoseph Koshyand
2103ebccf1e3SJoseph Koshy.Tn Xeon
2104ebccf1e3SJoseph Koshyprocessors.
2105ebccf1e3SJoseph KoshyThese PMCs are documented in
2106ebccf1e3SJoseph Koshy.Rs
2107ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Software Developer's Manual"
2108ebccf1e3SJoseph Koshy.%T "Volume 3: System Programming Guide"
2109ebccf1e3SJoseph Koshy.%N "Order Number 245472-012"
2110ebccf1e3SJoseph Koshy.%D 2003
2111ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
2112ebccf1e3SJoseph Koshy.Re
2113ebccf1e3SJoseph KoshyFurther information about using these PMCs may be found in
2114ebccf1e3SJoseph Koshy.Rs
2115ebccf1e3SJoseph Koshy.%B "IA-32 Intel(R) Architecture Optimization Guide"
2116ebccf1e3SJoseph Koshy.%D 2003
2117ebccf1e3SJoseph Koshy.%N "Order Number 248966-009"
2118ebccf1e3SJoseph Koshy.%Q "Intel Corporation"
2119ebccf1e3SJoseph Koshy.Re
212067edd229SJoseph KoshySome of these events are affected by processor errata described in
212167edd229SJoseph Koshy.Rs
212267edd229SJoseph Koshy.%B "Intel(R) Pentium(R) 4 Processor Specification Update"
212367edd229SJoseph Koshy.%N "Document Number: 249199-059"
212467edd229SJoseph Koshy.%D "April 2005"
212567edd229SJoseph Koshy.%Q "Intel Corporation"
212667edd229SJoseph Koshy.Re
2127ebccf1e3SJoseph Koshy.Pp
2128ebccf1e3SJoseph KoshyEvent specifiers for Intel P4 PMCs can have the following common
2129ebccf1e3SJoseph Koshyqualifiers:
2130ebccf1e3SJoseph Koshy.Bl -tag -width indent
2131ebccf1e3SJoseph Koshy.It Li active= Ns Ar choice
2132ebccf1e3SJoseph Koshy(On P4 HTT CPUs) Filter event counting based on which logical
2133ebccf1e3SJoseph Koshyprocessors are active.
2134ebccf1e3SJoseph KoshyThe allowed values of
2135ebccf1e3SJoseph Koshy.Ar choice
2136ebccf1e3SJoseph Koshyare:
21379abe909bSRuslan Ermilov.Pp
2138ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2139ebccf1e3SJoseph Koshy.It Li any
2140ebccf1e3SJoseph KoshyCount when either logical processor is active.
2141ebccf1e3SJoseph Koshy.It Li both
2142ebccf1e3SJoseph KoshyCount when both logical processors are active.
2143ebccf1e3SJoseph Koshy.It Li none
2144ebccf1e3SJoseph KoshyCount only when neither logical processor is active.
2145ebccf1e3SJoseph Koshy.It Li single
2146ebccf1e3SJoseph KoshyCount only when one logical processor is active.
2147ebccf1e3SJoseph Koshy.El
21489abe909bSRuslan Ermilov.Pp
2149ebccf1e3SJoseph KoshyThe default is
21509abe909bSRuslan Ermilov.Dq Li both .
2151ebccf1e3SJoseph Koshy.It Li cascade
2152ebccf1e3SJoseph KoshyConfigure the PMC to cascade onto its partner.
2153ebccf1e3SJoseph KoshySee
2154ebccf1e3SJoseph Koshy.Sx "Cascading P4 PMCs"
2155ebccf1e3SJoseph Koshybelow for more information.
2156ebccf1e3SJoseph Koshy.It Li edge
2157ebccf1e3SJoseph KoshyConfigure the counter to count false to true transitions of the threshold
2158ebccf1e3SJoseph Koshycomparision output.
2159ebccf1e3SJoseph KoshyThis qualifier only takes effect if a threshold qualifier has also been
2160ebccf1e3SJoseph Koshyspecified.
2161ebccf1e3SJoseph Koshy.It Li complement
2162ebccf1e3SJoseph KoshyConfigure the counter to increment only when the event count seen is
2163ebccf1e3SJoseph Koshyless than the threshold qualifier value specified.
2164ebccf1e3SJoseph Koshy.It Li mask= Ns Ar qualifier
2165ebccf1e3SJoseph KoshyMany event specifiers for Intel P4 PMCs need to be additionally
2166ebccf1e3SJoseph Koshyqualified using a mask qualifier.
2167ebccf1e3SJoseph KoshyThe allowed syntax for these qualifiers is event specific and is
2168ebccf1e3SJoseph Koshydescribed along with the events.
2169ebccf1e3SJoseph Koshy.It Li os
2170ebccf1e3SJoseph KoshyConfigure the PMC to count when the CPL of the processor is 0.
2171ebccf1e3SJoseph Koshy.It Li precise
2172ebccf1e3SJoseph KoshySelect precise event based sampling.
2173ebccf1e3SJoseph KoshyPrecise sampling is supported by the hardware for a limited set of
2174ebccf1e3SJoseph Koshyevents.
2175ebccf1e3SJoseph Koshy.It Li tag= Ns Ar value
2176ebccf1e3SJoseph KoshyConfigure the PMC to tag the internal uop selected by the other
2177ebccf1e3SJoseph Koshyfields in this event specifier with value
2178ebccf1e3SJoseph Koshy.Ar value .
2179ebccf1e3SJoseph KoshyThis feature is used when cascading PMCs.
2180ebccf1e3SJoseph Koshy.It Li threshold= Ns Ar value
2181ebccf1e3SJoseph KoshyConfigure the PMC to increment only when the event counts seen are
2182ebccf1e3SJoseph Koshygreater than the specified threshold value
2183ebccf1e3SJoseph Koshy.Ar value .
2184ebccf1e3SJoseph Koshy.It Li usr
2185ebccf1e3SJoseph KoshyConfigure the PMC to count when the CPL of the processor is 1, 2 or 3.
2186ebccf1e3SJoseph Koshy.El
21879abe909bSRuslan Ermilov.Pp
2188ebccf1e3SJoseph KoshyIf neither of the
21899abe909bSRuslan Ermilov.Dq Li os
2190ebccf1e3SJoseph Koshyor
21919abe909bSRuslan Ermilov.Dq Li usr
2192ebccf1e3SJoseph Koshyqualifiers are specified, the default is to enable both.
2193ebccf1e3SJoseph Koshy.Pp
2194ebccf1e3SJoseph KoshyOn Intel Pentium 4 processors with HTT, events are
2195ebccf1e3SJoseph Koshydivided into two classes:
21969abe909bSRuslan Ermilov.Pp
21979abe909bSRuslan Ermilov.Bl -tag -width indent -compact
2198ebccf1e3SJoseph Koshy.It "TS Events"
2199ebccf1e3SJoseph Koshyare those where hardware can differentiate between events
2200ebccf1e3SJoseph Koshygenerated on one logical processor from those generated on the
2201ebccf1e3SJoseph Koshyother.
2202ebccf1e3SJoseph Koshy.It "TI Events"
2203ebccf1e3SJoseph Koshyare those where hardware cannot differentiate between events
2204ebccf1e3SJoseph Koshygenerated by multiple logical processors in a package.
2205ebccf1e3SJoseph Koshy.El
22069abe909bSRuslan Ermilov.Pp
2207ebccf1e3SJoseph KoshyOnly TS events are allowed for use with process-mode PMCs on
2208ebccf1e3SJoseph KoshyPentium-4/HTT CPUs.
2209ebccf1e3SJoseph Koshy.Pp
2210ebccf1e3SJoseph KoshyThe event specifiers supported by Intel P4 PMCs are:
22119abe909bSRuslan Ermilov.Pp
2212ebccf1e3SJoseph Koshy.Bl -tag -width indent
2213ebccf1e3SJoseph Koshy.It Li p4-128bit-mmx-uop Op Li ,mask= Ns Ar flags
2214ebccf1e3SJoseph Koshy.Pq "TI event"
2215ebccf1e3SJoseph KoshyCount integer SIMD SSE2 instructions that operate on 128 bit SIMD
2216ebccf1e3SJoseph Koshyoperands.
2217ebccf1e3SJoseph KoshyQualifier
2218ebccf1e3SJoseph Koshy.Ar flags
2219ebccf1e3SJoseph Koshycan take the following value (which is also the default):
22209abe909bSRuslan Ermilov.Pp
2221ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2222ebccf1e3SJoseph Koshy.It Li all
2223ebccf1e3SJoseph KoshyCount all uops operating on 128 bit SIMD integer operands in memory or
2224ebccf1e3SJoseph KoshyXMM register.
2225ebccf1e3SJoseph Koshy.El
22269abe909bSRuslan Ermilov.Pp
2227ebccf1e3SJoseph KoshyIf an instruction contains more than one 128 bit MMX uop, then each
2228ebccf1e3SJoseph Koshyuop will be counted.
2229ebccf1e3SJoseph Koshy.It Li p4-64bit-mmx-uop Op Li ,mask= Ns Ar flags
2230ebccf1e3SJoseph Koshy.Pq "TI event"
2231ebccf1e3SJoseph KoshyCount MMX instructions that operate on 64 bit SIMD operands.
2232ebccf1e3SJoseph KoshyQualifier
2233ebccf1e3SJoseph Koshy.Ar flags
2234ebccf1e3SJoseph Koshycan take the following value (which is also the default):
22359abe909bSRuslan Ermilov.Pp
2236ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2237ebccf1e3SJoseph Koshy.It Li all
2238ebccf1e3SJoseph KoshyCount all uops operating on 64 bit SIMD integer operands in memory or
2239ebccf1e3SJoseph Koshyin MMX registers.
2240ebccf1e3SJoseph Koshy.El
22419abe909bSRuslan Ermilov.Pp
2242ebccf1e3SJoseph KoshyIf an instruction contains more than one 64 bit MMX uop, then each
2243ebccf1e3SJoseph Koshyuop will be counted.
2244ebccf1e3SJoseph Koshy.It Li p4-b2b-cycles
2245ebccf1e3SJoseph Koshy.Pq "TI event"
2246ebccf1e3SJoseph KoshyCount back-to-back bys cycles.
2247ebccf1e3SJoseph KoshyFurther documentation for this event is unavailable.
2248ebccf1e3SJoseph Koshy.It Li p4-bnr
2249ebccf1e3SJoseph Koshy.Pq "TI event"
2250ebccf1e3SJoseph KoshyCount bus-not-ready conditions.
2251ebccf1e3SJoseph KoshyFurther documentation for this event is unavailable.
2252ebccf1e3SJoseph Koshy.It Li p4-bpu-fetch-request Op Li ,mask= Ns Ar qualifier
2253ebccf1e3SJoseph Koshy.Pq "TS event"
2254ebccf1e3SJoseph KoshyCount instruction fetch requests qualified by additional
2255ebccf1e3SJoseph Koshyflags specified in
2256ebccf1e3SJoseph Koshy.Ar qualifier .
2257ebccf1e3SJoseph KoshyAt this point only one flag is supported:
22589abe909bSRuslan Ermilov.Pp
2259ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2260ebccf1e3SJoseph Koshy.It Li tcmiss
2261ebccf1e3SJoseph KoshyCount trace cache lookup misses.
2262ebccf1e3SJoseph Koshy.El
22639abe909bSRuslan Ermilov.Pp
2264ebccf1e3SJoseph KoshyThe default qualifier is also
22659abe909bSRuslan Ermilov.Dq Li mask=tcmiss .
2266ebccf1e3SJoseph Koshy.It Li p4-branch-retired Op Li ,mask= Ns Ar flags
2267ebccf1e3SJoseph Koshy.Pq "TS event"
2268ebccf1e3SJoseph KoshyCounts retired branches.
2269ebccf1e3SJoseph KoshyQualifier
2270ebccf1e3SJoseph Koshy.Ar flags
2271ebccf1e3SJoseph Koshyis a list of the following
22729abe909bSRuslan Ermilov.Ql +
2273ebccf1e3SJoseph Koshyseparated strings:
22749abe909bSRuslan Ermilov.Pp
2275ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2276ebccf1e3SJoseph Koshy.It Li mmnp
2277ebccf1e3SJoseph KoshyCount branches not-taken and predicted.
2278ebccf1e3SJoseph Koshy.It Li mmnm
2279ebccf1e3SJoseph KoshyCount branches not-taken and mis-predicted.
2280ebccf1e3SJoseph Koshy.It Li mmtp
2281ebccf1e3SJoseph KoshyCount branches taken and predicted.
2282ebccf1e3SJoseph Koshy.It Li mmtm
2283ebccf1e3SJoseph KoshyCount branches taken and mis-predicted.
2284ebccf1e3SJoseph Koshy.El
22859abe909bSRuslan Ermilov.Pp
2286ebccf1e3SJoseph KoshyThe default qualifier counts all four kinds of branches.
2287ebccf1e3SJoseph Koshy.It Li p4-bsq-active-entries Op Li ,mask= Ns Ar qualifier
2288ebccf1e3SJoseph Koshy.Pq "TS event"
2289ebccf1e3SJoseph KoshyCount the number of entries (clipped at 15) currently active in the
2290ebccf1e3SJoseph KoshyBSQ.
2291ebccf1e3SJoseph KoshyQualifier
2292ebccf1e3SJoseph Koshy.Ar qualifier
2293ebccf1e3SJoseph Koshyis a
22949abe909bSRuslan Ermilov.Ql +
2295ebccf1e3SJoseph Koshyseparated set of the following flags:
22969abe909bSRuslan Ermilov.Pp
2297ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2298ebccf1e3SJoseph Koshy.It Li req-type0 , Li req-type1
2299ebccf1e3SJoseph KoshyForms a 2-bit number used to select the request type encoding:
23009abe909bSRuslan Ermilov.Pp
2301ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2302ebccf1e3SJoseph Koshy.It Li 0
2303ebccf1e3SJoseph Koshyreads excluding read invalidate
2304ebccf1e3SJoseph Koshy.It Li 1
2305ebccf1e3SJoseph Koshyread invalidates
2306ebccf1e3SJoseph Koshy.It Li 2
2307ebccf1e3SJoseph Koshywrites other than writebacks
2308ebccf1e3SJoseph Koshy.It Li 3
2309ebccf1e3SJoseph Koshywritebacks
2310ebccf1e3SJoseph Koshy.El
23119abe909bSRuslan Ermilov.Pp
2312ebccf1e3SJoseph KoshyBit
23139abe909bSRuslan Ermilov.Dq Li req-type1
2314ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2315ebccf1e3SJoseph Koshy.It Li req-len0 , Li req-len1
2316ebccf1e3SJoseph KoshyForms a two-bit number that specifies the request length encoding:
23179abe909bSRuslan Ermilov.Pp
2318ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2319ebccf1e3SJoseph Koshy.It Li 0
2320ebccf1e3SJoseph Koshy0 chunks
2321ebccf1e3SJoseph Koshy.It Li 1
2322ebccf1e3SJoseph Koshy1 chunk
2323ebccf1e3SJoseph Koshy.It Li 3
2324ebccf1e3SJoseph Koshy8 chunks
2325ebccf1e3SJoseph Koshy.El
23269abe909bSRuslan Ermilov.Pp
2327ebccf1e3SJoseph KoshyBit
23289abe909bSRuslan Ermilov.Dq Li req-len1
2329ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2330ebccf1e3SJoseph Koshy.It Li req-io-type
2331ebccf1e3SJoseph KoshyCount requests that are input or output requests.
2332ebccf1e3SJoseph Koshy.It Li req-lock-type
2333ebccf1e3SJoseph KoshyCount requests that lock the bus.
2334ebccf1e3SJoseph Koshy.It Li req-lock-cache
2335ebccf1e3SJoseph KoshyCount requests that lock the cache.
2336ebccf1e3SJoseph Koshy.It Li req-split-type
2337ebccf1e3SJoseph KoshyCount requests that is a bus 8-byte chunk that is split across an
2338ebccf1e3SJoseph Koshy8-byte boundary.
2339ebccf1e3SJoseph Koshy.It Li req-dem-type
2340ebccf1e3SJoseph KoshyCount requests that are demand (not prefetches) if set.
2341ebccf1e3SJoseph KoshyCount requests that are prefetches if not set.
2342ebccf1e3SJoseph Koshy.It Li req-ord-type
2343ebccf1e3SJoseph KoshyCount requests that are ordered.
2344ebccf1e3SJoseph Koshy.It Li mem-type0 , Li mem-type1 , Li mem-type2
2345ebccf1e3SJoseph KoshyForms a 3-bit number that specifies a memory type encoding:
23469abe909bSRuslan Ermilov.Pp
2347ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2348ebccf1e3SJoseph Koshy.It Li 0
2349ebccf1e3SJoseph KoshyUC
2350ebccf1e3SJoseph Koshy.It Li 1
2351ebccf1e3SJoseph KoshyUSWC
2352ebccf1e3SJoseph Koshy.It Li 4
2353ebccf1e3SJoseph KoshyWT
2354ebccf1e3SJoseph Koshy.It Li 5
2355ebccf1e3SJoseph KoshyWP
2356ebccf1e3SJoseph Koshy.It Li 6
2357ebccf1e3SJoseph KoshyWB
2358ebccf1e3SJoseph Koshy.El
23599abe909bSRuslan Ermilov.Pp
2360ebccf1e3SJoseph KoshyBit
23619abe909bSRuslan Ermilov.Dq Li mem-type2
2362ebccf1e3SJoseph Koshyis the MSB of this 3-bit number.
2363ebccf1e3SJoseph Koshy.El
23649abe909bSRuslan Ermilov.Pp
2365ebccf1e3SJoseph KoshyThe default qualifier has all the above bits set.
2366ebccf1e3SJoseph Koshy.Pp
2367ebccf1e3SJoseph KoshyEdge triggering using the
23689abe909bSRuslan Ermilov.Dq Li edge
2369ebccf1e3SJoseph Koshyqualifier should not be used with this event when counting cycles.
2370ebccf1e3SJoseph Koshy.It Li p4-bsq-allocation Op Li ,mask= Ns Ar qualifier
2371ebccf1e3SJoseph Koshy.Pq "TS event"
2372ebccf1e3SJoseph KoshyCount allocations in the bus sequence unit according to the flags
2373ebccf1e3SJoseph Koshyspecified in
2374ebccf1e3SJoseph Koshy.Ar qualifier ,
2375ebccf1e3SJoseph Koshywhich is a
23769abe909bSRuslan Ermilov.Ql +
2377ebccf1e3SJoseph Koshyseparated set of the following flags:
23789abe909bSRuslan Ermilov.Pp
2379ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2380ebccf1e3SJoseph Koshy.It Li req-type0 , Li req-type1
2381ebccf1e3SJoseph KoshyForms a 2-bit number used to select the request type encoding:
23829abe909bSRuslan Ermilov.Pp
2383ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2384ebccf1e3SJoseph Koshy.It Li 0
2385ebccf1e3SJoseph Koshyreads excluding read invalidate
2386ebccf1e3SJoseph Koshy.It Li 1
2387ebccf1e3SJoseph Koshyread invalidates
2388ebccf1e3SJoseph Koshy.It Li 2
2389ebccf1e3SJoseph Koshywrites other than writebacks
2390ebccf1e3SJoseph Koshy.It Li 3
2391ebccf1e3SJoseph Koshywritebacks
2392ebccf1e3SJoseph Koshy.El
23939abe909bSRuslan Ermilov.Pp
2394ebccf1e3SJoseph KoshyBit
23959abe909bSRuslan Ermilov.Dq Li req-type1
2396ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2397ebccf1e3SJoseph Koshy.It Li req-len0 , Li req-len1
2398ebccf1e3SJoseph KoshyForms a two-bit number that specifies the request length encoding:
23999abe909bSRuslan Ermilov.Pp
2400ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2401ebccf1e3SJoseph Koshy.It Li 0
2402ebccf1e3SJoseph Koshy0 chunks
2403ebccf1e3SJoseph Koshy.It Li 1
2404ebccf1e3SJoseph Koshy1 chunk
2405ebccf1e3SJoseph Koshy.It Li 3
2406ebccf1e3SJoseph Koshy8 chunks
2407ebccf1e3SJoseph Koshy.El
24089abe909bSRuslan Ermilov.Pp
2409ebccf1e3SJoseph KoshyBit
24109abe909bSRuslan Ermilov.Dq Li req-len1
2411ebccf1e3SJoseph Koshyis the MSB for this two bit number.
2412ebccf1e3SJoseph Koshy.It Li req-io-type
2413ebccf1e3SJoseph KoshyCount requests that are input or output requests.
2414ebccf1e3SJoseph Koshy.It Li req-lock-type
2415ebccf1e3SJoseph KoshyCount requests that lock the bus.
2416ebccf1e3SJoseph Koshy.It Li req-lock-cache
2417ebccf1e3SJoseph KoshyCount requests that lock the cache.
2418ebccf1e3SJoseph Koshy.It Li req-split-type
2419ebccf1e3SJoseph KoshyCount requests that is a bus 8-byte chunk that is split across an
2420ebccf1e3SJoseph Koshy8-byte boundary.
2421ebccf1e3SJoseph Koshy.It Li req-dem-type
2422ebccf1e3SJoseph KoshyCount requests that are demand (not prefetches) if set.
2423ebccf1e3SJoseph KoshyCount requests that are prefetches if not set.
2424ebccf1e3SJoseph Koshy.It Li req-ord-type
2425ebccf1e3SJoseph KoshyCount requests that are ordered.
2426ebccf1e3SJoseph Koshy.It Li mem-type0 , Li mem-type1 , Li mem-type2
2427ebccf1e3SJoseph KoshyForms a 3-bit number that specifies a memory type encoding:
24289abe909bSRuslan Ermilov.Pp
2429ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2430ebccf1e3SJoseph Koshy.It Li 0
2431ebccf1e3SJoseph KoshyUC
2432ebccf1e3SJoseph Koshy.It Li 1
2433ebccf1e3SJoseph KoshyUSWC
2434ebccf1e3SJoseph Koshy.It Li 4
2435ebccf1e3SJoseph KoshyWT
2436ebccf1e3SJoseph Koshy.It Li 5
2437ebccf1e3SJoseph KoshyWP
2438ebccf1e3SJoseph Koshy.It Li 6
2439ebccf1e3SJoseph KoshyWB
2440ebccf1e3SJoseph Koshy.El
24419abe909bSRuslan Ermilov.Pp
2442ebccf1e3SJoseph KoshyBit
24439abe909bSRuslan Ermilov.Dq Li mem-type2
2444ebccf1e3SJoseph Koshyis the MSB of this 3-bit number.
2445ebccf1e3SJoseph Koshy.El
24469abe909bSRuslan Ermilov.Pp
2447ebccf1e3SJoseph KoshyThe default qualifier has all the above bits set.
2448ebccf1e3SJoseph Koshy.Pp
2449ebccf1e3SJoseph KoshyThis event is usually used along with the
24509abe909bSRuslan Ermilov.Dq Li edge
2451ebccf1e3SJoseph Koshyqualifier to avoid multiple counting.
2452ebccf1e3SJoseph Koshy.It Li p4-bsq-cache-reference Op Li ,mask= Ns Ar qualifier
2453ebccf1e3SJoseph Koshy.Pq "TS event"
2454ebccf1e3SJoseph KoshyCount cache references as seen by the bus unit (2nd or 3rd level
2455ebccf1e3SJoseph Koshycache references).
2456ebccf1e3SJoseph KoshyQualifier
2457ebccf1e3SJoseph Koshy.Ar qualifier
2458ebccf1e3SJoseph Koshyis a
24599abe909bSRuslan Ermilov.Ql +
2460ebccf1e3SJoseph Koshyseparated list of the following keywords:
24619abe909bSRuslan Ermilov.Pp
2462ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2463ebccf1e3SJoseph Koshy.It Li rd-2ndl-hits
2464ebccf1e3SJoseph KoshyCount 2nd level cache hits in the shared state.
2465ebccf1e3SJoseph Koshy.It Li rd-2ndl-hite
2466ebccf1e3SJoseph KoshyCount 2nd level cache hits in the exclusive state.
2467ebccf1e3SJoseph Koshy.It Li rd-2ndl-hitm
2468ebccf1e3SJoseph KoshyCount 2nd level cache hits in the modified state.
2469ebccf1e3SJoseph Koshy.It Li rd-3rdl-hits
2470ebccf1e3SJoseph KoshyCount 3rd level cache hits in the shared state.
2471ebccf1e3SJoseph Koshy.It Li rd-3rdl-hite
2472ebccf1e3SJoseph KoshyCount 3rd level cache hits in the exclusive state.
2473ebccf1e3SJoseph Koshy.It Li rd-3rdl-hitm
2474ebccf1e3SJoseph KoshyCount 3rd level cache hits in the modified state.
2475ebccf1e3SJoseph Koshy.It Li rd-2ndl-miss
2476ebccf1e3SJoseph KoshyCount 2nd level cache misses.
2477ebccf1e3SJoseph Koshy.It Li rd-3rdl-miss
2478ebccf1e3SJoseph KoshyCount 3rd level cache misses.
2479ebccf1e3SJoseph Koshy.It Li wr-2ndl-miss
2480ebccf1e3SJoseph KoshyCount write-back lookups from the data access cache that miss the 2nd
2481ebccf1e3SJoseph Koshylevel cache.
2482ebccf1e3SJoseph Koshy.El
24839abe909bSRuslan Ermilov.Pp
2484ebccf1e3SJoseph KoshyThe default is to count all the above events.
2485ebccf1e3SJoseph Koshy.It Li p4-execution-event Op Li ,mask= Ns Ar flags
2486ebccf1e3SJoseph Koshy.Pq "TS event"
2487ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the execution
2488ebccf1e3SJoseph Koshytagging mechanism.
2489ebccf1e3SJoseph KoshyQualifier
2490ebccf1e3SJoseph Koshy.Ar flags
2491ebccf1e3SJoseph Koshycan contain the following strings separated by
24929abe909bSRuslan Ermilov.Ql +
2493ebccf1e3SJoseph Koshycharacters:
24949abe909bSRuslan Ermilov.Pp
2495ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2496ebccf1e3SJoseph Koshy.It Li nbogus0 , Li nbogus1 , Li nbogus2 , Li nbogus3
2497ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2498ebccf1e3SJoseph Koshy.It Li bogus0 , Li bogus1 , Li bogus2 , Li bogus3
2499ebccf1e3SJoseph KoshyThe marked uops are bogus.
2500ebccf1e3SJoseph Koshy.El
25019abe909bSRuslan Ermilov.Pp
2502ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2503ebccf1e3SJoseph Koshyperform the desired uop tagging.
2504ebccf1e3SJoseph KoshyThe default is to set all the above flags.
2505ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2506ebccf1e3SJoseph Koshy.It Li p4-front-end-event Op Li ,mask= Ns Ar flags
2507ebccf1e3SJoseph Koshy.Pq "TS event"
2508ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the front-end
2509ebccf1e3SJoseph Koshytagging mechanism.
2510ebccf1e3SJoseph KoshyQualifier
2511ebccf1e3SJoseph Koshy.Ar flags
2512ebccf1e3SJoseph Koshycan contain the following strings separated by
25139abe909bSRuslan Ermilov.Ql +
2514ebccf1e3SJoseph Koshycharacters:
25159abe909bSRuslan Ermilov.Pp
2516ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2517ebccf1e3SJoseph Koshy.It Li nbogus
2518ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2519ebccf1e3SJoseph Koshy.It Li bogus
2520ebccf1e3SJoseph KoshyThe marked uops are bogus.
2521ebccf1e3SJoseph Koshy.El
25229abe909bSRuslan Ermilov.Pp
2523ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2524ebccf1e3SJoseph Koshyperform the desired uop tagging.
2525ebccf1e3SJoseph KoshyThe default is to select both kinds of events.
2526ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2527ebccf1e3SJoseph Koshy.It Li p4-fsb-data-activity Op Li ,mask= Ns Ar flags
2528ebccf1e3SJoseph Koshy.Pq "TI event"
2529ebccf1e3SJoseph KoshyCount each DBSY or DRDY event selected by qualifier
2530ebccf1e3SJoseph Koshy.Ar flags .
2531ebccf1e3SJoseph KoshyQualifier
2532ebccf1e3SJoseph Koshy.Ar flags
2533ebccf1e3SJoseph Koshyis a
25349abe909bSRuslan Ermilov.Ql +
2535ebccf1e3SJoseph Koshyseparated set of the following flags:
25369abe909bSRuslan Ermilov.Pp
2537ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2538ebccf1e3SJoseph Koshy.It Li drdy-drv
2539ebccf1e3SJoseph KoshyCount when this processor is driving data onto the bus.
2540ebccf1e3SJoseph Koshy.It Li drdy-own
2541ebccf1e3SJoseph KoshyCount when this processor is reading data from the bus.
2542ebccf1e3SJoseph Koshy.It Li drdy-other
2543ebccf1e3SJoseph KoshyCount when data is on the bus but not being sampled by this processor.
2544ebccf1e3SJoseph Koshy.It Li dbsy-drv
2545ebccf1e3SJoseph KoshyCount when this processor reserves the bus for use in the next cycle
2546ebccf1e3SJoseph Koshyin order to drive data.
2547ebccf1e3SJoseph Koshy.It Li dbsy-own
2548ebccf1e3SJoseph KoshyCount when some agent reserves the bus for use in the next bus cycle
2549ebccf1e3SJoseph Koshyto drive data that this processor will sample.
2550ebccf1e3SJoseph Koshy.It Li dbsy-other
2551ebccf1e3SJoseph KoshyCount when some agent reserves the bus for use in the next bus cycle
2552ebccf1e3SJoseph Koshyto drive data that this processor will not sample.
2553ebccf1e3SJoseph Koshy.El
25549abe909bSRuslan Ermilov.Pp
2555ebccf1e3SJoseph KoshyFlags
25569abe909bSRuslan Ermilov.Dq Li drdy-own
2557ebccf1e3SJoseph Koshyand
25589abe909bSRuslan Ermilov.Dq Li drdy-other
2559ebccf1e3SJoseph Koshyare mutually exclusive.
2560ebccf1e3SJoseph KoshyFlags
25619abe909bSRuslan Ermilov.Dq Li dbsy-own
2562ebccf1e3SJoseph Koshyand
25639abe909bSRuslan Ermilov.Dq Li dbsy-other
2564ebccf1e3SJoseph Koshyare mutually exclusive.
2565ebccf1e3SJoseph KoshyThe default value for
2566ebccf1e3SJoseph Koshy.Ar qualifier
2567ebccf1e3SJoseph Koshyis
25689abe909bSRuslan Ermilov.Dq Li drdy-drv+drdy-own+dbsy-drv+dbsy-own .
2569ebccf1e3SJoseph Koshy.It Li p4-global-power-events Op Li ,mask= Ns Ar flags
2570ebccf1e3SJoseph Koshy.Pq "TS event"
2571ebccf1e3SJoseph KoshyCount cycles during which the processor is not stopped.
2572ebccf1e3SJoseph KoshyQualifier
2573ebccf1e3SJoseph Koshy.Ar flags
2574ebccf1e3SJoseph Koshycan take the following value (which is also the default):
25759abe909bSRuslan Ermilov.Pp
2576ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2577ebccf1e3SJoseph Koshy.It Li running
2578ebccf1e3SJoseph KoshyCount cycles when the processor is active.
2579ebccf1e3SJoseph Koshy.El
25809abe909bSRuslan Ermilov.Pp
2581ebccf1e3SJoseph Koshy.It Li p4-instr-retired Op Li ,mask= Ns Ar flags
2582ebccf1e3SJoseph Koshy.Pq "TS event"
2583ebccf1e3SJoseph KoshyCount instructions retired during a clock cycle.
2584ebccf1e3SJoseph KoshyQualifer
2585ebccf1e3SJoseph Koshy.Ar flags
2586ebccf1e3SJoseph Koshycomprises of the following strings separated by
25879abe909bSRuslan Ermilov.Ql +
2588ebccf1e3SJoseph Koshycharacters:
25899abe909bSRuslan Ermilov.Pp
2590ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2591ebccf1e3SJoseph Koshy.It Li nbogusntag
2592ebccf1e3SJoseph KoshyCount non-bogus instructions that are not tagged.
2593ebccf1e3SJoseph Koshy.It Li nbogustag
2594ebccf1e3SJoseph KoshyCount non-bogus instructions that are tagged.
2595ebccf1e3SJoseph Koshy.It Li bogusntag
2596ebccf1e3SJoseph KoshyCount bogus instructions that are not tagged.
2597ebccf1e3SJoseph Koshy.It Li bogustag
2598ebccf1e3SJoseph KoshyCount bogus instructions that are tagged.
2599ebccf1e3SJoseph Koshy.El
26009abe909bSRuslan Ermilov.Pp
2601ebccf1e3SJoseph KoshyThe default qualifier counts all the above kinds of instructions.
2602ebccf1e3SJoseph Koshy.It Li p4-ioq-active-entries Xo
2603ebccf1e3SJoseph Koshy.Op Li ,mask= Ns Ar qualifier
2604ebccf1e3SJoseph Koshy.Op Li ,busreqtype= Ns Ar req-type
2605ebccf1e3SJoseph Koshy.Xc
2606ebccf1e3SJoseph Koshy.Pq "TS event"
2607ebccf1e3SJoseph KoshyCount the number of entries (clipped at 15) in the IOQ that are
2608ebccf1e3SJoseph Koshyactive.
2609ebccf1e3SJoseph KoshyThe event masks are specified by qualifier
2610ebccf1e3SJoseph Koshy.Ar qualifier
2611ebccf1e3SJoseph Koshyand
2612ebccf1e3SJoseph Koshy.Ar req-type .
2613ebccf1e3SJoseph Koshy.Pp
2614ebccf1e3SJoseph KoshyQualifier
2615ebccf1e3SJoseph Koshy.Ar qualifier
2616ebccf1e3SJoseph Koshyis a
26179abe909bSRuslan Ermilov.Ql +
2618ebccf1e3SJoseph Koshyseparated set of the following flags:
26199abe909bSRuslan Ermilov.Pp
2620ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2621ebccf1e3SJoseph Koshy.It Li all-read
2622ebccf1e3SJoseph KoshyCount read entries.
2623ebccf1e3SJoseph Koshy.It Li all-write
2624ebccf1e3SJoseph KoshyCount write entries.
2625ebccf1e3SJoseph Koshy.It Li mem-uc
2626ebccf1e3SJoseph KoshyCount entries accessing uncacheable memory.
2627ebccf1e3SJoseph Koshy.It Li mem-wc
2628ebccf1e3SJoseph KoshyCount entries accessing write-combining memory.
2629ebccf1e3SJoseph Koshy.It Li mem-wt
2630ebccf1e3SJoseph KoshyCount entries accessing write-through memory.
2631ebccf1e3SJoseph Koshy.It Li mem-wp
2632ebccf1e3SJoseph KoshyCount entries accessing write-protected memory
2633ebccf1e3SJoseph Koshy.It Li mem-wb
2634ebccf1e3SJoseph KoshyCount entries accessing write-back memory.
2635ebccf1e3SJoseph Koshy.It Li own
2636ebccf1e3SJoseph KoshyCount store requests driven by the processor (i.e., not by other
2637ebccf1e3SJoseph Koshyprocessors or by DMA).
2638ebccf1e3SJoseph Koshy.It Li other
2639ebccf1e3SJoseph KoshyCount store requests driven by other processors or by DMA.
2640ebccf1e3SJoseph Koshy.It Li prefetch
2641ebccf1e3SJoseph KoshyInclude hardware and software prefetch requests in the count.
2642ebccf1e3SJoseph Koshy.El
26439abe909bSRuslan Ermilov.Pp
2644ebccf1e3SJoseph KoshyThe default value for
2645ebccf1e3SJoseph Koshy.Ar qualifier
2646ebccf1e3SJoseph Koshyis to enable all the above flags.
2647ebccf1e3SJoseph Koshy.Pp
2648ebccf1e3SJoseph KoshyThe
2649ebccf1e3SJoseph Koshy.Ar req-type
2650ebccf1e3SJoseph Koshyqualifier is a 5-bit number can be additionally used to select a
2651ebccf1e3SJoseph Koshyspecific bus request type.
2652ebccf1e3SJoseph KoshyThe default is 0.
2653ebccf1e3SJoseph Koshy.Pp
2654ebccf1e3SJoseph KoshyThe
26559abe909bSRuslan Ermilov.Dq Li edge
2656ebccf1e3SJoseph Koshyqualifier should not be used when counting cycles with this event.
2657ebccf1e3SJoseph KoshyThe exact behaviour of this event depends on the processor revision.
2658ebccf1e3SJoseph Koshy.It Li p4-ioq-allocation Xo
2659ebccf1e3SJoseph Koshy.Op Li ,mask= Ns Ar qualifier
2660ebccf1e3SJoseph Koshy.Op Li ,busreqtype= Ns Ar req-type
2661ebccf1e3SJoseph Koshy.Xc
2662ebccf1e3SJoseph Koshy.Pq "TS event"
2663ebccf1e3SJoseph KoshyCount various types of transactions on the bus matching the flags set
2664ebccf1e3SJoseph Koshyin
2665ebccf1e3SJoseph Koshy.Ar qualifier
2666ebccf1e3SJoseph Koshyand
2667ebccf1e3SJoseph Koshy.Ar req-type .
2668ebccf1e3SJoseph Koshy.Pp
2669ebccf1e3SJoseph KoshyQualifier
2670ebccf1e3SJoseph Koshy.Ar qualifier
2671ebccf1e3SJoseph Koshyis a
26729abe909bSRuslan Ermilov.Ql +
2673ebccf1e3SJoseph Koshyseparated set of the following flags:
26749abe909bSRuslan Ermilov.Pp
2675ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2676ebccf1e3SJoseph Koshy.It Li all-read
2677ebccf1e3SJoseph KoshyCount read entries.
2678ebccf1e3SJoseph Koshy.It Li all-write
2679ebccf1e3SJoseph KoshyCount write entries.
2680ebccf1e3SJoseph Koshy.It Li mem-uc
2681ebccf1e3SJoseph KoshyCount entries accessing uncacheable memory.
2682ebccf1e3SJoseph Koshy.It Li mem-wc
2683ebccf1e3SJoseph KoshyCount entries accessing write-combining memory.
2684ebccf1e3SJoseph Koshy.It Li mem-wt
2685ebccf1e3SJoseph KoshyCount entries accessing write-through memory.
2686ebccf1e3SJoseph Koshy.It Li mem-wp
2687ebccf1e3SJoseph KoshyCount entries accessing write-protected memory
2688ebccf1e3SJoseph Koshy.It Li mem-wb
2689ebccf1e3SJoseph KoshyCount entries accessing write-back memory.
2690ebccf1e3SJoseph Koshy.It Li own
2691ebccf1e3SJoseph KoshyCount store requests driven by the processor (i.e., not by other
2692ebccf1e3SJoseph Koshyprocessors or by DMA).
2693ebccf1e3SJoseph Koshy.It Li other
2694ebccf1e3SJoseph KoshyCount store requests driven by other processors or by DMA.
2695ebccf1e3SJoseph Koshy.It Li prefetch
2696ebccf1e3SJoseph KoshyInclude hardware and software prefetch requests in the count.
2697ebccf1e3SJoseph Koshy.El
26989abe909bSRuslan Ermilov.Pp
2699ebccf1e3SJoseph KoshyThe default value for
2700ebccf1e3SJoseph Koshy.Ar qualifier
2701ebccf1e3SJoseph Koshyis to enable all the above flags.
2702ebccf1e3SJoseph Koshy.Pp
2703ebccf1e3SJoseph KoshyThe
2704ebccf1e3SJoseph Koshy.Ar req-type
2705ebccf1e3SJoseph Koshyqualifier is a 5-bit number can be additionally used to select a
2706ebccf1e3SJoseph Koshyspecific bus request type.
2707ebccf1e3SJoseph KoshyThe default is 0.
2708ebccf1e3SJoseph Koshy.Pp
2709ebccf1e3SJoseph KoshyThe
27109abe909bSRuslan Ermilov.Dq Li edge
2711ebccf1e3SJoseph Koshyqualifier is normally used with this event to prevent multiple
2712ebccf1e3SJoseph Koshycounting.
2713ebccf1e3SJoseph KoshyThe exact behaviour of this event depends on the processor revision.
2714ebccf1e3SJoseph Koshy.It Li p4-itlb-reference Op mask= Ns Ar qualifier
2715ebccf1e3SJoseph Koshy.Pq "TS event"
2716ebccf1e3SJoseph KoshyCount translations using the intruction translation look-aside
2717ebccf1e3SJoseph Koshybuffer.
2718ebccf1e3SJoseph KoshyThe
2719ebccf1e3SJoseph Koshy.Ar qualifier
2720ebccf1e3SJoseph Koshyargument is a list of the following strings separated by
27219abe909bSRuslan Ermilov.Ql +
2722ebccf1e3SJoseph Koshycharacters.
27239abe909bSRuslan Ermilov.Pp
2724ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2725ebccf1e3SJoseph Koshy.It Li hit
2726ebccf1e3SJoseph KoshyCount ITLB hits.
2727ebccf1e3SJoseph Koshy.It Li miss
2728ebccf1e3SJoseph KoshyCount ITLB misses.
2729ebccf1e3SJoseph Koshy.It Li hit-uc
2730ebccf1e3SJoseph KoshyCount uncacheable ITLB hits.
2731ebccf1e3SJoseph Koshy.El
27329abe909bSRuslan Ermilov.Pp
2733ebccf1e3SJoseph KoshyIf no
2734ebccf1e3SJoseph Koshy.Ar qualifier
2735ebccf1e3SJoseph Koshyis specified the default is to count all the three kinds of ITLB
2736ebccf1e3SJoseph Koshytranslations.
2737ebccf1e3SJoseph Koshy.It Li p4-load-port-replay Op Li ,mask= Ns Ar qualifier
2738ebccf1e3SJoseph Koshy.Pq "TS event"
2739ebccf1e3SJoseph KoshyCount replayed events at the load port.
2740ebccf1e3SJoseph KoshyQualifier
2741ebccf1e3SJoseph Koshy.Ar qualifier
2742ebccf1e3SJoseph Koshycan take on one value:
27439abe909bSRuslan Ermilov.Pp
2744ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2745ebccf1e3SJoseph Koshy.It Li split-ld
2746ebccf1e3SJoseph KoshyCount split loads.
2747ebccf1e3SJoseph Koshy.El
27489abe909bSRuslan Ermilov.Pp
2749ebccf1e3SJoseph KoshyThe default value for
2750ebccf1e3SJoseph Koshy.Ar qualifier
2751ebccf1e3SJoseph Koshyis
27529abe909bSRuslan Ermilov.Dq Li split-ld .
2753ebccf1e3SJoseph Koshy.It Li p4-mispred-branch-retired Op Li ,mask= Ns Ar flags
2754ebccf1e3SJoseph Koshy.Pq "TS event"
2755ebccf1e3SJoseph KoshyCount mispredicted IA-32 branch instructions.
2756ebccf1e3SJoseph KoshyQualifier
2757ebccf1e3SJoseph Koshy.Ar flags
2758ebccf1e3SJoseph Koshycan take the following value (which is also the default):
27599abe909bSRuslan Ermilov.Pp
2760ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2761ebccf1e3SJoseph Koshy.It Li nbogus
2762ebccf1e3SJoseph KoshyCount non-bogus retired branch instructions.
2763ebccf1e3SJoseph Koshy.El
2764ebccf1e3SJoseph Koshy.It Li p4-machine-clear Op Li ,mask= Ns Ar flags
2765ebccf1e3SJoseph Koshy.Pq "TS event"
2766ebccf1e3SJoseph KoshyCount the number of pipeline clears seen by the processor.
2767ebccf1e3SJoseph KoshyQualifer
2768ebccf1e3SJoseph Koshy.Ar flags
2769ebccf1e3SJoseph Koshyis a list of the following strings separated by
27709abe909bSRuslan Ermilov.Ql +
2771ebccf1e3SJoseph Koshycharacters:
27729abe909bSRuslan Ermilov.Pp
2773ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2774ebccf1e3SJoseph Koshy.It Li clear
2775ebccf1e3SJoseph KoshyCount for a portion of the many cycles when the machine is being
2776ebccf1e3SJoseph Koshycleared for any reason.
2777ebccf1e3SJoseph Koshy.It Li moclear
2778ebccf1e3SJoseph KoshyCount machine clears due to memory ordering issues.
2779ebccf1e3SJoseph Koshy.It Li smclear
2780ebccf1e3SJoseph KoshyCount machine clears due to self-modifying code.
2781ebccf1e3SJoseph Koshy.El
27829abe909bSRuslan Ermilov.Pp
2783ebccf1e3SJoseph KoshyUse qualifier
27849abe909bSRuslan Ermilov.Dq Li edge
2785ebccf1e3SJoseph Koshyto get a count of occurrences of machine clears.
2786ebccf1e3SJoseph KoshyThe default qualifier is
27879abe909bSRuslan Ermilov.Dq Li clear .
2788ebccf1e3SJoseph Koshy.It Li p4-memory-cancel Op Li ,mask= Ns Ar event-list
2789ebccf1e3SJoseph Koshy.Pq "TS event"
2790ebccf1e3SJoseph KoshyCount the cancelling of various kinds of requests in the data cache
2791ebccf1e3SJoseph Koshyaddress control unit of the CPU.
2792ebccf1e3SJoseph KoshyThe qualifier
2793ebccf1e3SJoseph Koshy.Ar event-list
2794ebccf1e3SJoseph Koshyis a list of the following strings separated by
27959abe909bSRuslan Ermilov.Ql +
2796ebccf1e3SJoseph Koshycharacters:
27979abe909bSRuslan Ermilov.Pp
2798ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2799ebccf1e3SJoseph Koshy.It Li st-rb-full
2800ebccf1e3SJoseph KoshyRequests cancelled because no store request buffer was available.
2801ebccf1e3SJoseph Koshy.It Li 64k-conf
2802ebccf1e3SJoseph KoshyRequests that conflict due to 64K aliasing.
2803ebccf1e3SJoseph Koshy.El
28049abe909bSRuslan Ermilov.Pp
2805ebccf1e3SJoseph KoshyIf
2806ebccf1e3SJoseph Koshy.Ar event-list
2807ebccf1e3SJoseph Koshyis not specified, then the default is to count both kinds of events.
2808ebccf1e3SJoseph Koshy.It Li p4-memory-complete Op Li ,mask= Ns Ar event-list
2809ebccf1e3SJoseph Koshy.Pq "TS event"
2810ebccf1e3SJoseph KoshyCount the completion of load split, store split, uncacheable split and
2811ebccf1e3SJoseph Koshyuncacheable load operations selected by qualifier
2812ebccf1e3SJoseph Koshy.Ar event-list .
2813ebccf1e3SJoseph KoshyThe qualifier
2814ebccf1e3SJoseph Koshy.Ar event-list
2815ebccf1e3SJoseph Koshyis a
28169abe909bSRuslan Ermilov.Ql +
2817ebccf1e3SJoseph Koshyseparated list of the following flags:
28189abe909bSRuslan Ermilov.Pp
2819ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2820ebccf1e3SJoseph Koshy.It Li lsc
2821ebccf1e3SJoseph KoshyCount load splits completed, excluding loads from uncacheable or
2822ebccf1e3SJoseph Koshywrite-combining areas.
2823ebccf1e3SJoseph Koshy.It Li ssc
2824ebccf1e3SJoseph KoshyCount any split stores completed.
2825ebccf1e3SJoseph Koshy.El
28269abe909bSRuslan Ermilov.Pp
2827ebccf1e3SJoseph KoshyThe default is to count both kinds of operations.
2828ebccf1e3SJoseph Koshy.It Li p4-mob-load-replay Op Li ,mask= Ns Ar qualifier
2829ebccf1e3SJoseph Koshy.Pq "TS event"
2830ebccf1e3SJoseph KoshyCount load replays triggered by the memory order buffer.
2831ebccf1e3SJoseph KoshyQualifier
2832ebccf1e3SJoseph Koshy.Ar qualifier
2833ebccf1e3SJoseph Koshycan be a
28349abe909bSRuslan Ermilov.Ql +
2835ebccf1e3SJoseph Koshyseparated list of the following flags:
28369abe909bSRuslan Ermilov.Pp
2837ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2838ebccf1e3SJoseph Koshy.It Li no-sta
2839ebccf1e3SJoseph KoshyCount replays because of unknown store addresses.
2840ebccf1e3SJoseph Koshy.It Li no-std
2841ebccf1e3SJoseph KoshyCount replays because of unknown store data.
2842ebccf1e3SJoseph Koshy.It Li partial-data
2843ebccf1e3SJoseph KoshyCount replays because of partially overlapped data accesses between
2844ebccf1e3SJoseph Koshyload and store operations.
2845ebccf1e3SJoseph Koshy.It Li unalgn-addr
2846ebccf1e3SJoseph KoshyCount replays because of mismatches in the lower 4 bits of load and
2847ebccf1e3SJoseph Koshystore operations.
2848ebccf1e3SJoseph Koshy.El
28499abe909bSRuslan Ermilov.Pp
2850ebccf1e3SJoseph KoshyThe default qualifier is
2851ebccf1e3SJoseph Koshy.Ar no-sta+no-std+partial-data+unalgn-addr .
2852ebccf1e3SJoseph Koshy.It Li p4-packed-dp-uop Op Li ,mask= Ns Ar flags
2853ebccf1e3SJoseph Koshy.Pq "TI event"
2854ebccf1e3SJoseph KoshyCount packed double-precision uops.
2855ebccf1e3SJoseph KoshyQualifier
2856ebccf1e3SJoseph Koshy.Ar flags
2857ebccf1e3SJoseph Koshycan take the following value (which is also the default):
28589abe909bSRuslan Ermilov.Pp
2859ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2860ebccf1e3SJoseph Koshy.It Li all
2861ebccf1e3SJoseph KoshyCount all uops operating on packed double-precision operands.
2862ebccf1e3SJoseph Koshy.El
2863ebccf1e3SJoseph Koshy.It Li p4-packed-sp-uop Op Li ,mask= Ns Ar flags
2864ebccf1e3SJoseph Koshy.Pq "TI event"
2865ebccf1e3SJoseph KoshyCount packed single-precision uops.
2866ebccf1e3SJoseph KoshyQualifier
2867ebccf1e3SJoseph Koshy.Ar flags
2868ebccf1e3SJoseph Koshycan take the following value (which is also the default):
28699abe909bSRuslan Ermilov.Pp
2870ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2871ebccf1e3SJoseph Koshy.It Li all
2872ebccf1e3SJoseph KoshyCount all uops operating on packed single-precision operands.
2873ebccf1e3SJoseph Koshy.El
2874ebccf1e3SJoseph Koshy.It Li p4-page-walk-type Op Li ,mask= Ns Ar qualifier
2875ebccf1e3SJoseph Koshy.Pq "TI event"
2876ebccf1e3SJoseph KoshyCount page walks performed by the page miss handler.
2877ebccf1e3SJoseph KoshyQualifier
2878ebccf1e3SJoseph Koshy.Ar qualifier
2879ebccf1e3SJoseph Koshycan be a
28809abe909bSRuslan Ermilov.Ql +
2881ebccf1e3SJoseph Koshyseparated list of the following keywords:
28829abe909bSRuslan Ermilov.Pp
2883ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2884ebccf1e3SJoseph Koshy.It Li dtmiss
2885ebccf1e3SJoseph KoshyCount page walks for data TLB misses.
2886ebccf1e3SJoseph Koshy.It Li itmiss
2887ebccf1e3SJoseph KoshyCount page walks for instruction TLB misses.
2888ebccf1e3SJoseph Koshy.El
28899abe909bSRuslan Ermilov.Pp
2890ebccf1e3SJoseph KoshyThe default value for
2891ebccf1e3SJoseph Koshy.Ar qualifier
2892ebccf1e3SJoseph Koshyis
28939abe909bSRuslan Ermilov.Dq Li dtmiss+itmiss .
2894ebccf1e3SJoseph Koshy.It Li p4-replay-event Op Li ,mask= Ns Ar flags
2895ebccf1e3SJoseph Koshy.Pq "TS event"
2896ebccf1e3SJoseph KoshyCount the retirement of tagged uops selected through the replay
2897ebccf1e3SJoseph Koshytagging mechanism.
2898ebccf1e3SJoseph KoshyQualifier
2899ebccf1e3SJoseph Koshy.Ar flags
2900ebccf1e3SJoseph Koshycontains a
29019abe909bSRuslan Ermilov.Ql +
2902ebccf1e3SJoseph Koshyseparated set of the following strings:
29039abe909bSRuslan Ermilov.Pp
2904ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2905ebccf1e3SJoseph Koshy.It Li nbogus
2906ebccf1e3SJoseph KoshyThe marked uops are not bogus.
2907ebccf1e3SJoseph Koshy.It Li bogus
2908ebccf1e3SJoseph KoshyThe marked uops are bogus.
2909ebccf1e3SJoseph Koshy.El
29109abe909bSRuslan Ermilov.Pp
2911ebccf1e3SJoseph KoshyThis event requires additional (upstream) events to be allocated to
2912ebccf1e3SJoseph Koshyperform the desired uop tagging.
2913ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
2914ebccf1e3SJoseph KoshyThis event can be used for precise event based sampling.
2915ebccf1e3SJoseph Koshy.It Li p4-resource-stall Op Li ,mask= Ns Ar flags
2916ebccf1e3SJoseph Koshy.Pq "TS event"
2917ebccf1e3SJoseph KoshyCount the occurrence or latency of stalls in the allocator.
2918ebccf1e3SJoseph KoshyQualifier
2919ebccf1e3SJoseph Koshy.Ar flags
2920ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29219abe909bSRuslan Ermilov.Pp
2922ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2923ebccf1e3SJoseph Koshy.It Li sbfull
2924ebccf1e3SJoseph KoshyA stall due to the lack of store buffers.
2925ebccf1e3SJoseph Koshy.El
2926ebccf1e3SJoseph Koshy.It Li p4-response
2927ebccf1e3SJoseph Koshy.Pq "TI event"
2928ebccf1e3SJoseph KoshyCount different types of responses.
2929ebccf1e3SJoseph KoshyFurther documentation on this event is not available.
2930ebccf1e3SJoseph Koshy.It Li p4-retired-branch-type Op Li ,mask= Ns Ar flags
2931ebccf1e3SJoseph Koshy.Pq "TS event"
2932ebccf1e3SJoseph KoshyCount branches retired.
2933ebccf1e3SJoseph KoshyQualifier
2934ebccf1e3SJoseph Koshy.Ar flags
2935ebccf1e3SJoseph Koshycontains a
29369abe909bSRuslan Ermilov.Ql +
2937ebccf1e3SJoseph Koshyseparated list of strings:
29389abe909bSRuslan Ermilov.Pp
2939ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2940ebccf1e3SJoseph Koshy.It Li conditional
2941ebccf1e3SJoseph KoshyCount conditional jumps.
2942ebccf1e3SJoseph Koshy.It Li call
2943ebccf1e3SJoseph KoshyCount direct and indirect call branches.
2944ebccf1e3SJoseph Koshy.It Li return
2945ebccf1e3SJoseph KoshyCount return branches.
2946ebccf1e3SJoseph Koshy.It Li indirect
2947ebccf1e3SJoseph KoshyCount returns, indirect calls or indirect jumps.
2948ebccf1e3SJoseph Koshy.El
29499abe909bSRuslan Ermilov.Pp
2950ebccf1e3SJoseph KoshyThe default qualifier counts all the above branch types.
2951ebccf1e3SJoseph Koshy.It Li p4-retired-mispred-branch-type Op Li ,mask= Ns Ar flags
2952ebccf1e3SJoseph Koshy.Pq "TS event"
2953ebccf1e3SJoseph KoshyCount mispredicted branches retired.
2954ebccf1e3SJoseph KoshyQualifier
2955ebccf1e3SJoseph Koshy.Ar flags
2956ebccf1e3SJoseph Koshycontains a
29579abe909bSRuslan Ermilov.Ql +
2958ebccf1e3SJoseph Koshyseparated list of strings:
29599abe909bSRuslan Ermilov.Pp
2960ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2961ebccf1e3SJoseph Koshy.It Li conditional
2962ebccf1e3SJoseph KoshyCount conditional jumps.
2963ebccf1e3SJoseph Koshy.It Li call
2964ebccf1e3SJoseph KoshyCount indirect call branches.
2965ebccf1e3SJoseph Koshy.It Li return
2966ebccf1e3SJoseph KoshyCount return branches.
2967ebccf1e3SJoseph Koshy.It Li indirect
2968ebccf1e3SJoseph KoshyCount returns, indirect calls or indirect jumps.
2969ebccf1e3SJoseph Koshy.El
29709abe909bSRuslan Ermilov.Pp
2971ebccf1e3SJoseph KoshyThe default qualifier counts all the above branch types.
2972ebccf1e3SJoseph Koshy.It Li p4-scalar-dp-uop Op Li ,mask= Ns Ar flags
2973ebccf1e3SJoseph Koshy.Pq "TI event"
2974ebccf1e3SJoseph KoshyCount the number of scalar double-precision uops.
2975ebccf1e3SJoseph KoshyQualifier
2976ebccf1e3SJoseph Koshy.Ar flags
2977ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29789abe909bSRuslan Ermilov.Pp
2979ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2980ebccf1e3SJoseph Koshy.It Li all
2981ebccf1e3SJoseph KoshyCount the number of scalar double-precision uops.
2982ebccf1e3SJoseph Koshy.El
2983ebccf1e3SJoseph Koshy.It Li p4-scalar-sp-uop Op Li ,mask= Ns Ar flags
2984ebccf1e3SJoseph Koshy.Pq "TI event"
2985ebccf1e3SJoseph KoshyCount the number of scalar single-precision uops.
2986ebccf1e3SJoseph KoshyQualifier
2987ebccf1e3SJoseph Koshy.Ar flags
2988ebccf1e3SJoseph Koshycan take the following value (which is also the default):
29899abe909bSRuslan Ermilov.Pp
2990ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
2991ebccf1e3SJoseph Koshy.It Li all
2992ebccf1e3SJoseph KoshyCount all uops operating on scalar single-precision operands.
2993ebccf1e3SJoseph Koshy.El
2994ebccf1e3SJoseph Koshy.It Li p4-snoop
2995ebccf1e3SJoseph Koshy.Pq "TI event"
2996ebccf1e3SJoseph KoshyCount snoop traffic.
2997ebccf1e3SJoseph KoshyFurther documentation on this event is not available.
2998ebccf1e3SJoseph Koshy.It Li p4-sse-input-assist Op Li ,mask= Ns Ar flags
2999ebccf1e3SJoseph Koshy.Pq "TI event"
3000ebccf1e3SJoseph KoshyCount the number of times an assist is required to handle problems
3001ebccf1e3SJoseph Koshywith the operands for SSE and SSE2 operations.
3002ebccf1e3SJoseph KoshyQualifier
3003ebccf1e3SJoseph Koshy.Ar flags
3004ebccf1e3SJoseph Koshycan take the following value (which is also the default):
30059abe909bSRuslan Ermilov.Pp
3006ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3007ebccf1e3SJoseph Koshy.It Li all
3008ebccf1e3SJoseph KoshyCount assists for all SSE and SSE2 uops.
3009ebccf1e3SJoseph Koshy.El
3010ebccf1e3SJoseph Koshy.It Li p4-store-port-replay Op Li ,mask= Ns Ar qualifier
3011ebccf1e3SJoseph Koshy.Pq "TS event"
3012ebccf1e3SJoseph KoshyCount events replayed at the store port.
3013ebccf1e3SJoseph KoshyQualifier
3014ebccf1e3SJoseph Koshy.Ar qualifier
3015ebccf1e3SJoseph Koshycan take on one value:
30169abe909bSRuslan Ermilov.Pp
3017ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3018ebccf1e3SJoseph Koshy.It Li split-st
3019ebccf1e3SJoseph KoshyCount split stores.
3020ebccf1e3SJoseph Koshy.El
30219abe909bSRuslan Ermilov.Pp
3022ebccf1e3SJoseph KoshyThe default value for
3023ebccf1e3SJoseph Koshy.Ar qualifier
3024ebccf1e3SJoseph Koshyis
30259abe909bSRuslan Ermilov.Dq Li split-st .
3026ebccf1e3SJoseph Koshy.It Li p4-tc-deliver-mode Op Li ,mask= Ns Ar qualifier
3027ebccf1e3SJoseph Koshy.Pq "TI event"
3028ebccf1e3SJoseph KoshyCount the duration in cycles of operating modes of the trace cache and
3029ebccf1e3SJoseph Koshydecode engine.
3030ebccf1e3SJoseph KoshyThe desired operating mode is selected by
3031ebccf1e3SJoseph Koshy.Ar qualifier ,
3032ebccf1e3SJoseph Koshywhich is a list of the following strings separated by
30339abe909bSRuslan Ermilov.Ql +
3034ebccf1e3SJoseph Koshycharacters:
30359abe909bSRuslan Ermilov.Pp
3036ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3037ebccf1e3SJoseph Koshy.It Li DD
3038ebccf1e3SJoseph KoshyBoth logical processors are in deliver mode.
3039ebccf1e3SJoseph Koshy.It Li DB
3040ebccf1e3SJoseph KoshyLogical processor 0 is in deliver mode while logical processor 1 is in
3041ebccf1e3SJoseph Koshybuild mode.
3042ebccf1e3SJoseph Koshy.It Li DI
3043ebccf1e3SJoseph KoshyLogical processor 0 is in deliver mode while logical processor 1 is
3044ebccf1e3SJoseph Koshyhalted, or in machine clear, or transitioning to a long microcode
3045ebccf1e3SJoseph Koshyflow.
3046ebccf1e3SJoseph Koshy.It Li BD
3047ebccf1e3SJoseph KoshyLogical processor 0 is in build mode while logical processor 1 is in
3048ebccf1e3SJoseph Koshydeliver mode.
3049ebccf1e3SJoseph Koshy.It Li BB
3050ebccf1e3SJoseph KoshyBoth logical processors are in build mode.
3051ebccf1e3SJoseph Koshy.It Li BI
3052ebccf1e3SJoseph KoshyLogical processor 0 is in build mode while logical processor 1 is
3053ebccf1e3SJoseph Koshyhalted, or in machine clear or transitioning to a long microcode
3054ebccf1e3SJoseph Koshyflow.
3055ebccf1e3SJoseph Koshy.It Li ID
3056ebccf1e3SJoseph KoshyLogical processor 0 is halted, or in machine clear or transitioning to
3057ebccf1e3SJoseph Koshya long microcode flow while logical processor 1 is in deliver mode.
3058ebccf1e3SJoseph Koshy.It Li IB
3059ebccf1e3SJoseph KoshyLogical processor 0 is halted, or in machine clear or transitioning to
3060ebccf1e3SJoseph Koshya long microcode flow while logical processor 1 is in build mode.
3061ebccf1e3SJoseph Koshy.El
30629abe909bSRuslan Ermilov.Pp
3063ebccf1e3SJoseph KoshyIf there is only one logical processor in the processor package then
3064ebccf1e3SJoseph Koshythe qualifier for logical processor 1 is ignored.
3065ebccf1e3SJoseph KoshyIf no qualifier is specified, the default qualifier is
30669abe909bSRuslan Ermilov.Dq Li DD+DB+DI+BD+BB+BI+ID+IB .
3067ebccf1e3SJoseph Koshy.It Li p4-tc-ms-xfer Op Li ,mask= Ns Ar flags
3068ebccf1e3SJoseph Koshy.Pq "TI event"
3069ebccf1e3SJoseph KoshyCount the number of times uop delivery changed from the trace cache to
3070ebccf1e3SJoseph KoshyMS ROM.
3071ebccf1e3SJoseph KoshyQualifier
3072ebccf1e3SJoseph Koshy.Ar flags
3073ebccf1e3SJoseph Koshycan take the following value (which is also the default):
30749abe909bSRuslan Ermilov.Pp
3075ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3076ebccf1e3SJoseph Koshy.It Li cisc
3077ebccf1e3SJoseph KoshyCount TC to MS transfers.
3078ebccf1e3SJoseph Koshy.El
3079ebccf1e3SJoseph Koshy.It Li p4-uop-queue-writes Op Li ,mask= Ns Ar flags
3080ebccf1e3SJoseph Koshy.Pq "TS event"
3081ebccf1e3SJoseph KoshyCount the number of valid uops written to the uop queue.
3082ebccf1e3SJoseph KoshyQualifier
3083ebccf1e3SJoseph Koshy.Ar flags
3084ebccf1e3SJoseph Koshyis a list of the following strings, separated by
30859abe909bSRuslan Ermilov.Ql +
3086ebccf1e3SJoseph Koshycharacters:
30879abe909bSRuslan Ermilov.Pp
3088ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3089ebccf1e3SJoseph Koshy.It Li from-tc-build
3090ebccf1e3SJoseph KoshyCount uops being written from the trace cache in build mode.
3091ebccf1e3SJoseph Koshy.It Li from-tc-deliver
3092ebccf1e3SJoseph KoshyCount uops being written from the trace cache in deliver mode.
3093ebccf1e3SJoseph Koshy.It Li from-rom
3094ebccf1e3SJoseph KoshyCount uops being written from microcode ROM.
3095ebccf1e3SJoseph Koshy.El
30969abe909bSRuslan Ermilov.Pp
3097ebccf1e3SJoseph KoshyThe default qualifier counts all the above kinds of uops.
3098ebccf1e3SJoseph Koshy.It Li p4-uop-type Op Li ,mask= Ns Ar flags
3099ebccf1e3SJoseph Koshy.Pq "TS event"
3100ebccf1e3SJoseph KoshyThis event is used in conjunction with the front-end at-retirement
3101ebccf1e3SJoseph Koshymechanism to tag load and store uops.
3102ebccf1e3SJoseph KoshyQualifer
3103ebccf1e3SJoseph Koshy.Ar flags
3104ebccf1e3SJoseph Koshycomprises the following strings separated by
31059abe909bSRuslan Ermilov.Ql +
3106ebccf1e3SJoseph Koshycharacters:
31079abe909bSRuslan Ermilov.Pp
3108ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3109ebccf1e3SJoseph Koshy.It Li tagloads
3110ebccf1e3SJoseph KoshyMark uops that are load operations.
3111ebccf1e3SJoseph Koshy.It Li tagstores
3112ebccf1e3SJoseph KoshyMark uops that are store operations.
3113ebccf1e3SJoseph Koshy.El
31149abe909bSRuslan Ermilov.Pp
3115ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
3116ebccf1e3SJoseph Koshy.It Li p4-uops-retired Op Li ,mask= Ns Ar flags
3117ebccf1e3SJoseph Koshy.Pq "TS event"
3118ebccf1e3SJoseph KoshyCount uops retired during a clock cycle.
3119ebccf1e3SJoseph KoshyQualifier
3120ebccf1e3SJoseph Koshy.Ar flags
3121ebccf1e3SJoseph Koshycomprises the following strings separated by
31229abe909bSRuslan Ermilov.Ql +
3123ebccf1e3SJoseph Koshycharacters:
31249abe909bSRuslan Ermilov.Pp
3125ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3126ebccf1e3SJoseph Koshy.It Li nbogus
3127ebccf1e3SJoseph KoshyCount marked uops that are not bogus.
3128ebccf1e3SJoseph Koshy.It Li bogus
3129ebccf1e3SJoseph KoshyCount marked uops that are bogus.
3130ebccf1e3SJoseph Koshy.El
31319abe909bSRuslan Ermilov.Pp
3132ebccf1e3SJoseph KoshyThe default qualifier counts both kinds of uops.
3133ebccf1e3SJoseph Koshy.It Li p4-wc-buffer Op Li ,mask= Ns Ar flags
3134ebccf1e3SJoseph Koshy.Pq "TI event"
3135ebccf1e3SJoseph KoshyCount write-combining buffer operations.
3136ebccf1e3SJoseph KoshyQualifier
3137ebccf1e3SJoseph Koshy.Ar flags
3138ebccf1e3SJoseph Koshycontains the following strings separated by
31399abe909bSRuslan Ermilov.Ql +
3140ebccf1e3SJoseph Koshycharacters:
31419abe909bSRuslan Ermilov.Pp
3142ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3143ebccf1e3SJoseph Koshy.It Li wcb-evicts
3144ebccf1e3SJoseph KoshyWC buffer evictions due to any cause.
3145ebccf1e3SJoseph Koshy.It Li wcb-full-evict
3146ebccf1e3SJoseph KoshyWC buffer evictions due to no WC buffer being available.
3147ebccf1e3SJoseph Koshy.El
31489abe909bSRuslan Ermilov.Pp
3149ebccf1e3SJoseph KoshyThe default qualifer counts both kinds of evictions.
3150ebccf1e3SJoseph Koshy.It Li p4-x87-assist Op Li ,mask= Ns Ar flags
3151ebccf1e3SJoseph Koshy.Pq "TS event"
3152ebccf1e3SJoseph KoshyCount the retirement of x87 instructions that required special
3153ebccf1e3SJoseph Koshyhandling.
3154ebccf1e3SJoseph KoshyQualifier
3155ebccf1e3SJoseph Koshy.Ar flags
3156ebccf1e3SJoseph Koshycontains the following strings separated by
31579abe909bSRuslan Ermilov.Ql +
3158ebccf1e3SJoseph Koshycharacters:
31599abe909bSRuslan Ermilov.Pp
3160ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3161ebccf1e3SJoseph Koshy.It Li fpsu
3162ebccf1e3SJoseph KoshyCount instructions that saw an FP stack underflow.
3163ebccf1e3SJoseph Koshy.It Li fpso
3164ebccf1e3SJoseph KoshyCount instructions that saw an FP stack overflow.
3165ebccf1e3SJoseph Koshy.It Li poao
3166ebccf1e3SJoseph KoshyCount instructions that saw an x87 output overflow.
3167ebccf1e3SJoseph Koshy.It Li poau
3168ebccf1e3SJoseph KoshyCount instructions that saw an x87 output underflow.
3169ebccf1e3SJoseph Koshy.It Li prea
3170ebccf1e3SJoseph KoshyCount instructions that needed an x87 input assist.
3171ebccf1e3SJoseph Koshy.El
31729abe909bSRuslan Ermilov.Pp
3173ebccf1e3SJoseph KoshyThe default qualifier counts all the above types of instruction
3174ebccf1e3SJoseph Koshyretirements.
3175ebccf1e3SJoseph Koshy.It Li p4-x87-fp-uop Op Li ,mask= Ns Ar flags
3176ebccf1e3SJoseph Koshy.Pq "TI event"
3177ebccf1e3SJoseph KoshyCount x87 floating-point uops.
3178ebccf1e3SJoseph KoshyQualifier
3179ebccf1e3SJoseph Koshy.Ar flags
3180ebccf1e3SJoseph Koshycan take the following value (which is also the default):
31819abe909bSRuslan Ermilov.Pp
3182ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3183ebccf1e3SJoseph Koshy.It Li all
3184ebccf1e3SJoseph KoshyCount all x87 floating-point uops.
3185ebccf1e3SJoseph Koshy.El
31869abe909bSRuslan Ermilov.Pp
3187ebccf1e3SJoseph KoshyIf an instruction contains more than one x87 floating-point uops, then
3188ebccf1e3SJoseph Koshyall x87 floating-point uops will be counted.
3189ebccf1e3SJoseph KoshyThis event does not count x87 floating-point data movement operations.
3190ebccf1e3SJoseph Koshy.It Li p4-x87-simd-moves-uop Op Li ,mask= Ns Ar flags
3191ebccf1e3SJoseph Koshy.Pq "TI event"
3192ebccf1e3SJoseph KoshyCount each x87 FPU, MMX, SSE, or SSE2 uops that load data or store
3193ebccf1e3SJoseph Koshydata or perform register-to-register moves.
3194ebccf1e3SJoseph KoshyThis event does not count integer move uops.
3195ebccf1e3SJoseph KoshyQualifier
3196ebccf1e3SJoseph Koshy.Ar flags
3197ebccf1e3SJoseph Koshymay contain the following keywords separated by
31989abe909bSRuslan Ermilov.Ql +
3199ebccf1e3SJoseph Koshycharacters:
32009abe909bSRuslan Ermilov.Pp
3201ebccf1e3SJoseph Koshy.Bl -tag -width indent -compact
3202ebccf1e3SJoseph Koshy.It Li allp0
3203ebccf1e3SJoseph KoshyCount all x87 and SIMD store and move uops.
3204ebccf1e3SJoseph Koshy.It Li allp2
3205ebccf1e3SJoseph KoshyCount all x87 and SIMD load uops.
3206ebccf1e3SJoseph Koshy.El
32079abe909bSRuslan Ermilov.Pp
3208ebccf1e3SJoseph KoshyThe default is to count all uops.
320967edd229SJoseph Koshy.Pq Errata
321067edd229SJoseph KoshyThis event may be affected by processor errata N43.
3211ebccf1e3SJoseph Koshy.El
3212ebccf1e3SJoseph Koshy.Ss "Cascading P4 PMCs"
32139abe909bSRuslan ErmilovPMC cascading support is currently poorly implemented.
32149abe909bSRuslan ErmilovWhile individual event counters may be allocated with a
32159abe909bSRuslan Ermilov.Dq Li cascade
32169abe909bSRuslan Ermilovqualifier, the current API does not offer the ability
32179abe909bSRuslan Ermilovto name and allocate all the resources needed for a
32189abe909bSRuslan Ermilovcascaded event counter pair in a single operation.
3219ebccf1e3SJoseph Koshy.Ss "Precise Event Based Sampling"
32209abe909bSRuslan ErmilovSupport for precise event based sampling is currently
32219abe909bSRuslan Ermilovunimplemented in
32229abe909bSRuslan Ermilov.Xr hwpmc 4 .
3223ebccf1e3SJoseph Koshy.Sh IMPLEMENTATION NOTES
3224ebccf1e3SJoseph KoshyOn the i386 architecture,
3225ebccf1e3SJoseph Koshy.Fx
3226ebccf1e3SJoseph Koshyhas historically allowed the use of the RDTSC instruction from
3227ebccf1e3SJoseph Koshyuser-mode (i.e., at a processor CPL of 3) by any process.
3228ebccf1e3SJoseph KoshyThis behaviour is preserved by
3229ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
3230ebccf1e3SJoseph Koshy.Sh RETURN VALUES
3231ebccf1e3SJoseph KoshyThe
3232ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability ,
3233ebccf1e3SJoseph Koshy.Fn pmc_name_of_class ,
3234ebccf1e3SJoseph Koshy.Fn pmc_name_of_cputype ,
3235ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition ,
3236ebccf1e3SJoseph Koshy.Fn pmc_name_of_event ,
3237ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode ,
3238ebccf1e3SJoseph Koshyand
3239ebccf1e3SJoseph Koshy.Fn pmc_name_of_state
3240ebccf1e3SJoseph Koshyfunctions return a pointer to the human readable form of their argument.
3241ebccf1e3SJoseph KoshyThese pointers may point to statically allocated storage and must
3242ebccf1e3SJoseph Koshynot be passed to
3243ebccf1e3SJoseph Koshy.Fn free .
3244ebccf1e3SJoseph KoshyIn case of an error, these functions return
32459abe909bSRuslan Ermilov.Dv NULL
3246ebccf1e3SJoseph Koshyand set the global variable
3247ebccf1e3SJoseph Koshy.Va errno .
3248ebccf1e3SJoseph Koshy.Pp
3249ebccf1e3SJoseph KoshyThe functions
3250ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3251ebccf1e3SJoseph Koshyand
3252ebccf1e3SJoseph Koshy.Fn pmc_npmc
3253ebccf1e3SJoseph Koshyreturn the number of CPUs and number of PMCs configured respectively;
3254ebccf1e3SJoseph Koshyin case of an error they return the value
32559abe909bSRuslan Ermilov\-1
3256ebccf1e3SJoseph Koshyand set the global variable
3257ebccf1e3SJoseph Koshy.Va errno .
3258ebccf1e3SJoseph Koshy.Pp
3259ebccf1e3SJoseph KoshyAll other functions return the value
32609abe909bSRuslan Ermilov0
3261ebccf1e3SJoseph Koshyif successful; otherwise the value
32629abe909bSRuslan Ermilov\-1
3263ebccf1e3SJoseph Koshyis returned and the global variable
3264ebccf1e3SJoseph Koshy.Va errno
3265ebccf1e3SJoseph Koshyis set to indicate the error.
32665138c36aSJoseph Koshy.Sh COMPATIBILITY
32675138c36aSJoseph KoshyThe interface between the
3268110e1704SRuslan Ermilov.Nm pmc
32695138c36aSJoseph Koshylibrary and the
32705138c36aSJoseph Koshy.Xr hwpmc 4
32715138c36aSJoseph Koshydriver is intended to be private to the implementation and may
32725138c36aSJoseph Koshychange.
32735138c36aSJoseph KoshyIn order to ease forward compatibility with future versions of the
32745138c36aSJoseph Koshy.Xr hwpmc 4
32755138c36aSJoseph Koshydriver, applications are urged to dynamically link with the
3276110e1704SRuslan Ermilov.Nm pmc
32775138c36aSJoseph Koshylibrary.
32785138c36aSJoseph Koshy.Pp
32795138c36aSJoseph KoshyThe
3280110e1704SRuslan Ermilov.Nm pmc
32815138c36aSJoseph KoshyAPI is
32825138c36aSJoseph Koshy.Ud
3283ebccf1e3SJoseph Koshy.Sh ERRORS
3284ebccf1e3SJoseph KoshyA call to
3285ebccf1e3SJoseph Koshy.Fn pmc_init
3286ebccf1e3SJoseph Koshymay fail with the following errors in addition to those returned by
3287ebccf1e3SJoseph Koshy.Xr modfind 2 ,
3288ebccf1e3SJoseph Koshy.Xr modstat 2
3289ebccf1e3SJoseph Koshyand
3290ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3291ebccf1e3SJoseph Koshy.Bl -tag -width Er
3292ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3293ebccf1e3SJoseph KoshyAn unknown CPU type was encountered during initialization.
3294ebccf1e3SJoseph Koshy.It Bq Er EPROGMISMATCH
3295ebccf1e3SJoseph KoshyThe version number of the
3296ebccf1e3SJoseph Koshy.Xr hwpmc 4
3297ebccf1e3SJoseph Koshykernel module did not match that compiled into the
3298110e1704SRuslan Ermilov.Nm pmc
3299ebccf1e3SJoseph Koshylibrary.
3300ebccf1e3SJoseph Koshy.El
3301ebccf1e3SJoseph Koshy.Pp
3302ebccf1e3SJoseph KoshyA call to
3303c5153e19SJoseph Koshy.Fn pmc_capabilities ,
3304ebccf1e3SJoseph Koshy.Fn pmc_name_of_capability ,
3305ebccf1e3SJoseph Koshy.Fn pmc_name_of_disposition ,
3306ebccf1e3SJoseph Koshy.Fn pmc_name_of_state ,
3307ebccf1e3SJoseph Koshy.Fn pmc_name_of_event ,
3308ebccf1e3SJoseph Koshy.Fn pmc_name_of_mode
3309ebccf1e3SJoseph Koshy.Fn pmc_name_of_class
3310c5153e19SJoseph Koshyand
3311c5153e19SJoseph Koshy.Fn pmc_width
3312ebccf1e3SJoseph Koshymay fail with the following error:
3313ebccf1e3SJoseph Koshy.Bl -tag -width Er
3314ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3315ebccf1e3SJoseph KoshyAn invalid argument was passed to the function.
3316ebccf1e3SJoseph Koshy.El
3317ebccf1e3SJoseph Koshy.Pp
3318ebccf1e3SJoseph KoshyA call to
3319ebccf1e3SJoseph Koshy.Fn pmc_cpuinfo
3320ebccf1e3SJoseph Koshyor
3321ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3322ebccf1e3SJoseph Koshymay fail with the following error:
3323ebccf1e3SJoseph Koshy.Bl -tag -width Er
3324ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3325ebccf1e3SJoseph KoshyThe
3326110e1704SRuslan Ermilov.Nm pmc
3327ebccf1e3SJoseph Koshyhas not been initialized.
3328ebccf1e3SJoseph Koshy.El
3329ebccf1e3SJoseph Koshy.Pp
3330ebccf1e3SJoseph KoshyA call to
3331ebccf1e3SJoseph Koshy.Fn pmc_npmc
3332ebccf1e3SJoseph Koshymay fail with the following errors:
3333ebccf1e3SJoseph Koshy.Bl -tag -width Er
3334ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3335ebccf1e3SJoseph KoshyThe argument passed in was out of range.
3336ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3337ebccf1e3SJoseph KoshyThe
3338110e1704SRuslan Ermilov.Nm pmc
3339ebccf1e3SJoseph Koshylibrary has not been initialized.
3340ebccf1e3SJoseph Koshy.El
3341ebccf1e3SJoseph Koshy.Pp
3342ebccf1e3SJoseph KoshyA call to
3343ebccf1e3SJoseph Koshy.Fn pmc_pmcinfo
3344ebccf1e3SJoseph Koshymay fail with the following errors, in addition to those returned by
3345ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3346ebccf1e3SJoseph Koshy.Bl -tag -width Er
3347ebccf1e3SJoseph Koshy.It Bq Er ENXIO
3348ebccf1e3SJoseph KoshyThe
3349110e1704SRuslan Ermilov.Nm pmc
3350ebccf1e3SJoseph Koshylibrary is not yet initialized.
3351ebccf1e3SJoseph Koshy.El
3352ebccf1e3SJoseph Koshy.Pp
3353ebccf1e3SJoseph KoshyA call to
3354ebccf1e3SJoseph Koshy.Fn pmc_allocate
3355ebccf1e3SJoseph Koshymay fail with the following errors, in addition to those returned by
3356ebccf1e3SJoseph Koshy.Xr hwpmc 4 :
3357ebccf1e3SJoseph Koshy.Bl -tag -width Er
3358ebccf1e3SJoseph Koshy.It Bq Er EINVAL
3359ebccf1e3SJoseph KoshyThe
3360ebccf1e3SJoseph Koshy.Fa mode
3361ebccf1e3SJoseph Koshyargument passed in had an illegal value, or the event specification
3362ebccf1e3SJoseph Koshy.Fa ctrspec
33639abe909bSRuslan Ermilovwas unrecognized for this CPU type.
3364ebccf1e3SJoseph Koshy.El
3365ebccf1e3SJoseph Koshy.Pp
3366ebccf1e3SJoseph KoshyCalls to
3367ebccf1e3SJoseph Koshy.Fn pmc_attach ,
3368f263522aSJoseph Koshy.Fn pmc_configure_logfile ,
3369ebccf1e3SJoseph Koshy.Fn pmc_detach ,
3370f263522aSJoseph Koshy.Fn pmc_disable ,
3371f263522aSJoseph Koshy.Fn pmc_enable ,
3372f263522aSJoseph Koshy.Fn pmc_get_driver_stats ,
3373f263522aSJoseph Koshy.Fn pmc_get_msr ,
3374ebccf1e3SJoseph Koshy.Fn pmc_read ,
3375f263522aSJoseph Koshy.Fn pmc_release ,
3376ebccf1e3SJoseph Koshy.Fn pmc_rw ,
3377ebccf1e3SJoseph Koshy.Fn pmc_set ,
3378f263522aSJoseph Koshy.Fn pmc_start ,
3379f263522aSJoseph Koshy.Fn pmc_stop ,
3380f263522aSJoseph Koshy.Fn pmc_write ,
3381ebccf1e3SJoseph Koshyand
3382f263522aSJoseph Koshy.Fn pmc_writelog
3383ebccf1e3SJoseph Koshymay fail with the errors described in
3384ebccf1e3SJoseph Koshy.Xr hwpmc 4 .
3385f263522aSJoseph Koshy.Pp
3386f263522aSJoseph KoshyIf a log file was configured using
3387f263522aSJoseph Koshy.Fn pmc_configure_logfile
3388f263522aSJoseph Koshyand the
3389f263522aSJoseph Koshy.Xr hwpmc 4
3390f263522aSJoseph Koshydriver encountered an error while logging data to it, then
3391f263522aSJoseph Koshylogging will be stopped and a subsequent call to
3392f263522aSJoseph Koshy.Fn pmc_flush_logfile
3393f263522aSJoseph Koshywill fail with the error code seen by the
3394f263522aSJoseph Koshy.Xr hwpmc 4
3395f263522aSJoseph Koshydriver.
3396ebccf1e3SJoseph Koshy.Sh SEE ALSO
3397ebccf1e3SJoseph Koshy.Xr modfind 2 ,
3398ebccf1e3SJoseph Koshy.Xr modstat 2 ,
3399f263522aSJoseph Koshy.Xr calloc 3 ,
3400f263522aSJoseph Koshy.Xr pmclog 3 ,
3401ebccf1e3SJoseph Koshy.Xr hwpmc 4 ,
3402ebccf1e3SJoseph Koshy.Xr pmccontrol 8 ,
3403ebccf1e3SJoseph Koshy.Xr pmcstat 8
34045138c36aSJoseph Koshy.Sh HISTORY
34055138c36aSJoseph KoshyThe
3406110e1704SRuslan Ermilov.Nm pmc
34075138c36aSJoseph Koshylibrary first appeared in
34085138c36aSJoseph Koshy.Fx 6.0 .
3409ebccf1e3SJoseph Koshy.Sh BUGS
3410ebccf1e3SJoseph KoshyThe information returned by
3411ebccf1e3SJoseph Koshy.Fn pmc_cpuinfo ,
3412ebccf1e3SJoseph Koshy.Fn pmc_ncpu
3413ebccf1e3SJoseph Koshyand possibly
3414ebccf1e3SJoseph Koshy.Fn pmc_npmc
3415ebccf1e3SJoseph Koshyshould really be available all the time, through a better designed
3416f263522aSJoseph Koshyinterface and not just when
3417ebccf1e3SJoseph Koshy.Xr hwpmc 4
3418f263522aSJoseph Koshyis present in the kernel.
3419