resource stalls on Sandy Bridge

resource stalls on Sandy Bridge

Hi all,

I'm trying to measure the resource stalls on a SandyBridge machine. As the SDM introduces, I can break the stalls down to different causes as shown below.

RESOURCE_STALLS:ANY - 0x5301a2
RESOURCE_STALLS:LB - 0x5302a2
RESOURCE_STALLS:RS - 0x5304a2
RESOURCE_STALLS:SB - 0x5308a2
RESOURCE_STALLS:ROB - 0x5310a2
RESOURCE_STALLS:FCSW- 0x5320a2
RESOURCE_STALLS:MXCSR - 0x5340a2

To my understanding, the number of ANY is supposed to be equal to the sum of the other 6 numbers. But it seems to be wrong based on my experiments.

RESOURCE_STALLS:ANY: 397349463242
RESOURCE_STALLS:LB: 5379423
RESOURCE_STALLS:RS: 304513727418
RESOURCE_STALLS:SB: 2248871709
RESOURCE_STALLS:ROB: 18753462189
RESOURCE_STALLS:FCSW: 0
RESOURCE_STALLS:MXCSR: 0

Is that right, or there are more other causes of resource stalls that could not be counted? What are those causes?

Thank you very much!

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Patrick,

I assume so, but the numbers are telling something different from that assumption. :-(

Do you know anyone or anyhow I could verify this with Intel?

Thank you very much!

When you say "the numbers are telling something different from that assumption"... can you be more explicit? What is the assumption you are making and how are the numbers proving/disproving the assumption?

Pat

Hi Patrick,

Sorry for the confusion. I have the results of one experiment in the first post, where you could do the calculation and find that the .ANY is not equal to the sum of the rest stalls.

.ANY = 397349463242

REST = 5379423(.LB) + 304513727418(.RS) + 2248871709(.SB) + 18753462189(.ROB) + 0(.FCSW) + 0(.MXCSR) = 325521440739

Thank you very much for your help!

Right.

I would not expect the .ANY to be equal the rest.

What makes you think that .ANY would be equal to the rest?

Pat

Hmm, I thought .ANY was the sum of the resource stalls no matter what the cause is. Problem solve. Thank you so much! :-)

The name is not the most clear but they already used .OTHER for another sub-event.

Usually, when an event includes all the sub-events then the umask is the bitwise OR of the sub-events. In this case if you wanted to make a .ALL event, the umask would be 0xff.

Pat

Hi Yunqi,

jumping late to interesting discussion:) Below is detailed explanation of the event RESOURCE_STALLS.ANY meaning.

The number of instructions in the pipeline waiting for execution or retirement reached the limit the processor can handle.
The number of load or store instructions in the pipeline waiting for retirement reached the limit the processor can handle.
There is an instruction in the pipe that can be executed only when all previous stores complete and their data is committed in the caches or memory. Fore example, SFENCE and MFENCE instructions require this behavior.
The pipeline recovers from a mispredicted branched that was executed.
The floating-point unit ( FPU ) control word is written.

As you can this event is not a sum of the events measured by you in your post.

Cool! Thank you very much iliyapolak! :-)

You are always welcome :)

Leave a Comment

Please sign in to add a comment. Not a member? Join today