What does "Instruction Retired" mean exactly?

What does "Instruction Retired" mean exactly?

Hi,

I don't quite understand this term. I looked up the help manual, but I didn't find the explanation on what the verb "retire" mean to an instruction. Can anybody give me a little hint?

Thanks!

Leech

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Community Admin's picture

Each instruction takes different number of clickticks to be executed. "Instruction Retired" event shows how many instructions were completely executed between two clocktick event samples.

Leech,

Modern processors execute much more instructions that the program flow needs. This is called "speculative execution".

Then the instructions that were "proven" as indeed needed by flow are "retired".

You can think about "retired" instuctions as only instructions needed by the program flow.

-Daniel

Thanks.

I guess "retired instructions" means those instructions that are acturally executed and completed by CPU. The CPU some kind of prediction about the instructions to be excuted and put them into some place like a "pool". But not all of these instructions will be excuted. Is this correct?

Leech

Community Admin's picture

Yes.

Leech,

almost correct.
but CPU indeed speculatively executes much more instructions. But results are "stored" only for retired instructions.

By using "retired instruction" event VTune gives you much more "fair" count, it does not take into account the execution of "unneeded" instructions.

BTW you might want to experiment and collect event "Instructions decoded" also. Then you can compare it with "Instruction retired" and feel the difference.

-Daniel

Login to leave a comment.