linux - perf stat 中针对上下文切换显示的单位的含义是什么?

标签 linux performance perf context-switch

 8.014196 task-clock                #    0.004 CPUs utilized          
           204 context-switches          #    0.025 M/sec                  
            32 cpu-migrations            #    0.004 M/sec                  
             0 page-faults               #    0.000 K/sec                  
    11,841,196 cycles                    #    1.478 GHz                     [46.17%]
     9,982,788 stalled-cycles-frontend   #   84.31% frontend cycles idle    [80.26%]
     8,122,708 stalled-cycles-backend    #   68.60% backend  cycles idle   
     5,462,302 instructions              #    0.46  insns per cycle        
                                         #    1.83  stalled cycles per insn
     1,098,309 branches                  #  137.045 M/sec                  
        94,430 branch-misses             #    8.60% of all branches         [77.23%]

在上面的统计中,我可以看到上下文切换统计提到为204。但是 # 0.025 M/sec 之后的语句是什么?上下文切换是什么意思?我无法将其解释为每秒的开关次数。我尝试检查 wiki 页面和手册,但找不到任何与此相关的内容?

最佳答案

# 0.025 M/sec 表示每秒 0.025 万(来自 mega - 来自 metric/SI prefix )上下文切换(因此每秒 25,000 次)。

  • M/sec - 每秒百万
  • K/sec - 每秒千次

关于linux - perf stat 中针对上下文切换显示的单位的含义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38628489/

相关文章:

html - 在 Linux 上使用什么来检查大型项目中的 html 链接?

linux - 如何跳过文件的第一行并读取剩余行作为 C 程序的输入?

python - 在这个简单的例子中,为什么 Matlab 看起来比 Python 慢得多

sql - LIKE 100k 记录上的 2 列或 200k 记录上的一列更快吗?

linux - perf record -c 选项和溢出事件之间的关系是什么?

java - 并行处理: class file has wrong version 49. 0,应该是48.0

linux - 猫密码 | awk -F' :' ' {printf $1}' 这个命令正确吗?

php - microtime(true) - 无法测量 PHP 脚本执行时间

c++ - 如何在mmap中使用PERF_SAMPLE_READ

c - 内存复制基准测试的吞吐量分析