【发布时间】:2016-07-28 06:21:11
【问题描述】:
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%]
在上面的 stat 中,我可以看到上下文切换 stat 提到为 204。但是 # 0.025 M/sec 之后的语句在上下文切换时是什么意思?我不能将其解释为每秒的开关数。我尝试检查 wiki 页面和手册,但找不到任何相关信息?
【问题讨论】:
-
“我无法将其解释为每秒的开关次数”。为什么不?因为这正是它的本质。
-
@kaylum - 但是“M”代表什么?这让我很困惑。谢谢
-
超级。没有仔细研究过,但它可能意味着 10^6 或 2^20 。就本次讨论而言,这两个值都足够接近以达到相同的程度。
标签: linux performance perf context-switch