Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

store forwarding impact

vtuneuser
Beginner
149 Views
I ran Vtune to collect the Store forward performance impact from the application,the source view showed the following source and assembly code that had the high value of the performance impact,
Address Line Source MOB Loads
Replay
Retired
0x39219 100 if ( ((long)*s & 3L) == 0) { 1183
0x39219 100 CollectGarb+158: mov esi, DWORD PTP[ecx] 152
0x39219 100mov edx, esi736
0x39219 100and edx, 0x3h 122
0x39219 100 jnz CollectGarb+3a7173
I have read about store forwarding from the intel manual and some articles, but given the above info from Vtune, how do I tell what's wrong with these code? Doesthese code violate the store forwarding restriction? How?
Thanks.
0 Kudos
2 Replies
TimP
Black Belt
149 Views
If you had recently stored into part (but not all) of the 32-bit quantity at [ecx] (*s ?) you would be violating the hardware rules for efficient store forwarding. You would have to look further back in the code. Your source may cause an unnecessary move here, but the excessive performance impact would be a consequence of what happened earlier.
vtuneuser
Beginner
149 Views

Thanks for reply.

I went back a few lines that had the code with ecx,

mov ecx DWORD PTR [0x5238d4h]

add ecx, -0x4

move DWORD PTR[esp+058h], ecx

cmp ecx, eax

Would "mov ecx DWORD PTR[0x5238d4h]" be the instruction you are talking about? was it because the alignment problem?

Reply