【发布时间】:2019-05-30 00:24:18
【问题描述】:
TL;DR
提供-x 时,有什么方法可以使perf stat 输出时间过去?
背景
我执行了perf stat -e instructions:u make run,输出粘贴在下面。
Performance counter stats for 'make run':
53,781,961,288 instructions:u
2.802749955 seconds time elapsed
21.453244000 seconds user
0.249223000 seconds sys
我想解析指令数和经过的时间,所以我添加-x选项使输出用逗号分隔,对应的输出粘贴在下面。
53781782267,,instructions:u,20694056846,100.00,,
我注意到没有显示所有时间测量值,因此我检查了perf help stat 的输出。在CSV FORMAT 部分,我发现run time of counter、optional metric value 和optional unit of metric 可能与我的需求有关,但我无法弄清楚究竟是什么。
【问题讨论】:
-
你的
perf和linux内核版本是多少? -
@osgx 性能:
4.19.g84df95,linux 内核:4.17.11-arch1(byuname -r)