36-40 Vol. 3C
INTEL® PROCESSOR TRACE
clear to the decoder whether the near RET was compressed, and hence a bit in the in-progress TNT should be
consumed, or uncompressed, in which case there will be no in-progress TNT and thus a TIP should be consumed.
Note that in the unlikely case that a RET executes in a different execution mode than the associated CALL, the
decoder will need to model the same behavior with its CALL stack. For instance, if a CALL executes in 64-bit mode,
a 64-bit IP value will be pushed onto the software stack. If the corresponding RET executes in 32-bit mode, then
only the lower 32 target bits will be popped off of the stack, which may mean that the RET does not go to the CALL’s
Next IP. This is architecturally correct behavior, and this RET could be compressed, thus the decoder should match
this behavior
36.4.2.3 Deferred TIPs
The processor may opt to defer sending out the TNT when TIPs are generated. Thus, rather than sending a partial
TNT followed by a TIP, both packets will be deferred while the TNT accumulates more Jcc/RET results. Any number
of TIP packets may be accumulated this way, such that only once the TNT is filled, or once another packet (e.g.,
FUP) is generated, the TNT will be sent, followed by all the deferred TIP packets, and finally terminated by the other
packet(s) that forced out the TNT and TIP packets. Generation of many other packets (see list below) will force out
the TNT and any accumulated TIP packets. This is an optional optimization in hardware to reduce the bandwidth
consumption, and hence the performance impact, incurred by tracing.
Table 36-19. TNT Examples with Deferred TIPs
Code Flow
Packets, Non-Deferred TIPS
Packets, Deferred TIPS
0x1000 cmp %rcx, 0
0x1004 jnz Foo // not-taken
0x1008 jmp %rdx
TNT(0b0), TIP(0x1308)
0x1308 cmp %rcx, 1
0x130c jnz Bar // not-taken
0x1310 cmp %rcx, 2
0x1314 jnz Baz // taken
0x1500 cmp %eax, 7
0x1504 jg Exit // not-taken
0x1508 jmp %r15
TNT(0b010), TIP(0x1100)
0x1100 cmp %rbx, 1
0x1104 jg Start // not-taken
0x1108 add %rcx, %eax
0x110c … // an asynchronous Interrupt arrives
INThandler:
0xcc00 pop %rdx
TNT(0b0), FUP(0x110c),
TIP(0xcc00)
TNT(0b00100), TIP(0x1308),
TIP(0x1100), FUP(0x110c),
TIP(0xcc00)