retired instructions

来源:互联网 发布:网络策划怎么推广 编辑:程序博客网 时间:2024/06/05 08:27

1. COREINSTRRET means:

The definition for this signal is:

"Indicates that a core has retired at least one instruction recently."

This means the signal will be toggled every time an instructions is retired (so very often).

Instructions Retired:

This event indicates the number of instructions that retired or executed completely. 执行完的指令个数

This does not include partially processed instructions executed due to branch mispredictions. 

不包括由于分支预测失败而部分执行的指令。

表示消耗的指令数,计数执行过程中消耗的指令数。

说明:关于retire,一般表示退休什么的意思。

这里其实其含义就是“消耗”,retirement表示指令隐退,或者可以理解为其技术指令从执行到退出的那个退出的次数,自然,其实就表示消耗的指令数了。

对于包含多个微操作(micro-op)的指令,其只对最后一个微操作的指令引退进行计数,即只计数一次。

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

被证明实际真正执行的指令叫retired instruction。

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

but CPU indeed speculatively executes much more instructions. 

Butresults are "stored"only for retired instructions.

统计已执行完的指令数。Retired表示引退,意译也就是消耗或已执行完。该事件计数器统计已执行的指令数。

如果一条指令由多条微指令组成,那么该事件计数器仅对其最后一条微指令进行统计。

如果一条指令以rep为前缀(即意味着指令将执行多次),那么也将作为整体而只被统计一次。

2、CLUSTERPMUIRQ means

Official definition is:"Cluster PMU interruptrequest"

This signal will be raised by the DSU PMU events.

3、性能指标之CPI:

Clock ticks per Instructions Retired (CPI)

即Cycles per Instructions,表示每一条指令消耗的时钟周期。这是一个基础的性能指标之一,在进行性能分析时,其一般是首先会分析的一个指标。

很显然,CPI的值越小越好,CPI的计算为:Clockticks / Instructions Retired。如:

CPI=CPU_CLK_UNHALTED.THREAD/INST_RETIRED.ANY

说明:如果要计算一个函数的CPI,就使用相应的事件计算,这里的例子是计算整个thread的CPI。

根据经验值,如果CPI小于0.75,那么认为其性能是不错的。如果大于0.75,就需要考虑进行优化了。


原创粉丝点击