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/