background image

Vol. 3B 18-97

PERFORMANCE MONITORING

18.15.6.2   Tagging Mechanism for Front_end_event

The Front_end_event counts μops that have been tagged as encountering any of the following events:

μop decode events — Tagging μops for μop decode events requires specifying bits in the ESCR associated with 

the performance-monitoring event, Uop_type. 

Trace cache events — Tagging μops for trace cache events may require specifying certain bits in the 

MSR_TC_PRECISE_EVENT MSR (see Table 19-31).

Table 19-29 describes the Front_end_event and Table 19-31 describes metrics that are used to set up a 
Front_end_event count.
The MSRs specified in the Table 19-29 that are supported by the front-end tagging mechanism must be set and one 
or both of the NBOGUS and BOGUS bits in the Front_end_event event mask must be set to count events. None of 
the events currently supported requires the use of the MSR_TC_PRECISE_EVENT MSR. 

18.15.6.3   Tagging Mechanism For Execution_event

Table 19-29 describes the Execution_event and Table 19-32 describes metrics that are used to set up an 
Execution_event count.
The execution tagging mechanism differs from other tagging mechanisms in how it causes tagging. One upstream 
ESCR is used to specify an event to detect and to specify a tag value (bits 5 through 8) to identify that event. A 
second downstream ESCR is used to detect μops that have been tagged with that tag value identifier using 

Execution_event for the event selection. 
The upstream ESCR that counts the event must have its tag enable flag (bit 4) set and must have an appropriate 
tag value mask entered in its tag value field. The 4-bit tag value mask specifies which of tag bits should be set for 
a particular μop. The value selected for the tag value should coincide with the event mask selected in the down-

stream ESCR. For example, if a tag value of 1 is set, then the event mask of NBOGUS0 should be enabled, corre-
spondingly in the downstream ESCR. The downstream ESCR detects and counts tagged μops. The normal (not tag 

value) mask bits in the downstream ESCR specify which tag bits to count. If any one of the tag bits selected by the 
mask is set, the related counter is incremented by one. This mechanism is summarized in the Table 19-32 metrics 
that are supported by the execution tagging mechanism. The tag enable and tag value bits are irrelevant for the 
downstream ESCR used to select the Execution_event.
The four separate tag bits allow the user to simultaneously but distinctly count up to four execution events at 
retirement. (This applies for interrupt-based event sampling. There are additional restrictions for PEBS as noted in 
Section 18.15.7.3, “Setting Up the PEBS Buffer.”) It is also possible to detect or count combinations of events by 
setting multiple tag value bits in the upstream ESCR or multiple mask bits in the downstream ESCR. For example, 
use a tag value of 3H in the upstream ESCR and use NBOGUS0/NBOGUS1 in the downstream ESCR event mask.

18.15.6.4   Tagging Mechanism for Replay_event

Table 19-29 describes the Replay_event and Table 19-33 describes metrics that are used to set up an Replay_event 
count.
The replay mechanism enables tagging of μops for a subset of all replays before retirement. Use of the replay 

mechanism requires selecting the type of μop that may experience the replay in the MSR_PEBS_MATRIX_VERT 

MSR and selecting the type of event in the MSR_PEBS_ENABLE MSR. Replay tagging must also be enabled with the 
UOP_Tag flag (bit 24) in the MSR_PEBS_ENABLE MSR. 
The Table 19-33 lists the metrics that are support the replay tagging mechanism and the at-retirement events that 
use the replay tagging mechanism, and specifies how the appropriate MSRs need to be configured. The replay tags 
defined in Table A-5 also enable Processor Event-Based Sampling (PEBS, see Section 17.4.9). Each of these replay 
tags can also be used in normal sampling by not setting Bit 24 nor Bit 25 in IA_32_PEBS_ENABLE_MSR. Each of 
these metrics requires that the Replay_Event (see Table 19-29) be used to count the tagged μops.