428 Star 1.6K Fork 1.6K

GVPopenEuler/kernel

 / 详情

[openEuler 22.03] perf stat: Add --quiet option

已完成
需求 拥有者
创建于  
2021-09-30 17:09
perf stat: Add --quiet option

Add a new --quiet option to 'perf stat'. This is useful with 'perf stat
record' to write the data only to the perf.data file, which can lower
measurement overhead because the data doesn't need to be formatted.

On my 4C desktop:

  % time ./perf stat record  -e $(python -c 'print ",".join(["cycles"]*1000)')  -a -I 1000 sleep 5
  ...
  real    0m5.377s
  user    0m0.238s
  sys     0m0.452s
  % time ./perf stat record --quiet -e $(python -c 'print ",".join(["cycles"]*1000)')  -a -I 1000 sleep 5

  real    0m5.452s
  user    0m0.183s
  sys     0m0.423s

In this example it cuts the user time by 20%. On systems with more cores
the savings are higher.

Signed-off-by: Andi Kleen <andi@firstfloor.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Link: http://lore.kernel.org/lkml/20201027002737.30942-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat
-rw-r--r--	tools/perf/Documentation/perf-stat.txt	4	
-rw-r--r--	tools/perf/builtin-stat.c	6	
-rw-r--r--	tools/perf/util/stat.h	1	
3 files changed, 10 insertions, 1 deletions

from mainline-5.11
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=55a4de94c64bacffbcd802c954764e0de2ab217f

评论 (1)

Xie XiuQi 创建了需求 4年前
Xie XiuQi 关联仓库设置为openEuler/kernel 4年前
Xie XiuQi 添加了
 
severity/minor
标签
4年前
展开全部操作日志

Hi xiexiuqi, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at
https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @xiexiuqi, @yangyingliang, @gatieme.

openeuler-ci-bot 添加了
 
sig/Kernel
标签
4年前
zhengzengkai 通过合并 Pull Request !367: release 5.10.0-16.0.0任务状态新建 修改为已完成 4年前

登录 后才可以发表评论

状态
负责人
项目
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936 Xie XiuQi-xiexiuqi
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助