Software Tuning, Performance Optimization & Platform Monitoring
Discussion around monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform monitoring
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Questiona about Instructions Retired in PMU


Hi there,

Chapter 18.2.3 of Intel SDM describes the PMU event of "Instruction Retired", I have three questions about this;

  1. The manual says "For instructions that consist of multiple micro-ops...", what instructions consist of multiple micro-ops? Can interrupt or VMEXIT occurs in the middle of micro-ops?
  2. The manual says "Faults before the retirement of the last micro-op of a multi-ops instruction are not counted." What about faults occurs in the middle of REP-prefix instructions?
  3. The manual says "This event does not increment under VM-exit conditions." Does it mean all instructions in root level of VMX are not counted, or just the VMEXIT instruction are not counted?

Thanks very much.

0 Kudos
2 Replies
Black Belt

1.) Many machine code instructions are decoded into multiple micro-ops.Few of them are x87 FPU fsin and fcos also rdtsc is decoded in multiple more primitive instructions.I think that simple mov  instructions are decoded into one micro-op.For example push instruction could issue two micro-ops one for moving data and second for decrementing Sp.Also flow control instructions like call and ret are decoded into few micro-ops.Micro-ops at hardware level could be represented as specifically pcm encoded square waveforms which in some cases operate as a trigger or input to some logical units.

2)Interrupt is an asynchronous event which can occure anytime.Think about the NIC card interrupting CPU for  frame processing such interrupt can come in the middle of some code execution then CPU will look up specific handler for IV in IDT and transfer an execution to that handler also current context will be saved and restored later.This is at machine code level(assembly level).I only suppose that at microarchitecture level and because of decoupled design part of currently executed microops will be kept in internal buffers when the cpu will be servicing a higher priority code like ISR.

Black Belt

Regarding your third question I cannot find any suitable answer.