0

我想使用 perf 测量我的应用程序的停滞周期。

当我尝试:perf stat -B dd if=/dev/zero of=/dev/null count=1000000

1000000+0 records in
1000000+0 records out
512000000 bytes (512 MB) copied, 0.218456 s, 2.3 GB/s

Performance counter stats for 'dd if=/dev/zero of=/dev/null count=1000000':

218.420011 task-clock                #    0.995 CPUs utilized          
25 context-switches          #    0.000 M/sec                  
1 CPU-migrations            #    0.000 M/sec                  
255 page-faults               #    0.001 M/sec                  
821,183,099 cycles                    #    3.760 GHz                    
<not supported> stalled-cycles-frontend 
<not supported> stalled-cycles-backend  
1,526,427,190 instructions              #    1.86  insns per cycle        
292,281,624 branches                  # 1338.163 M/sec                  
1,013,837 branch-misses             #    0.35% of all branches        

0.219551862 seconds time elapsed

如您所见,我正在接受停滞周期* 事件。我在网上找不到解决方案或解释。

我的内核版本是 3.2.0-59,perf 版本是 3.2.54,我的 CPU 是 i7-3770。

4

0 回答 0