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?
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.
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.
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?
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.