xiehuc/llvm-prof

笔记本上的CPU节能导致inst-timing测不准.

Opened this issue · 0 comments

commit eef6a65
在我的笔记本上运行 inst-timing 报告如下 cpu频率为 0.98 GHz
CPU freq: 0.982647 GHz
load: 2.290752 nanoseconds, 2.251000 cycles
store: 0.934721 nanoseconds, 0.918500 cycles
fix_add: 0.919964 nanoseconds, 0.904000 cycles
float_add: 2.888119 nanoseconds, 2.838000 cycles
fix_mul: 2.862168 nanoseconds, 2.812500 cycles
float_mul: 9.908954 nanoseconds, 9.737000 cycles
fix_sub: 0.959653 nanoseconds, 0.943000 cycles

用lmbench的lat_ops 测量:
$> ./lat_ops
integer bit: 0.39 nanoseconds
integer add: 0.19 nanoseconds
integer mul: 1.19 nanoseconds
integer div: 8.09 nanoseconds
integer mod: 8.02 nanoseconds

实际上我的cpu频率为
model name : Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz

可能因为以前台式机不需要节能, 所以没有cpu变频, 笔记本才有变频的需求.