linux perf: 为什么采样频率设置成99Hz而不是100Hz
2017-11-28 09:23
381 查看
早晨在linuxer看到文章,感觉挺有意思,最早研究perf的时候接触过这些概念,乍一看倍感亲切。
sudo perf record -F 99 -a -g --sleep 20
perf record中这么几个参数还蛮有意思:
-g可以设置Cgroup,竟然用cgroup的名字做索引
-F 是采样的频率?
-F 99: sample at 99 Herz (samples per second), I'll sometimes sample faster than this (up to 999 Herz), but that also costs overhead. 99 Hert should be negligible. Also, the value '99' and not '100' is to avoid lockstep sampleing, which can produce skewed results.
lockstep 采样!
lockstep sampleing is when the profiling samples occur at the same frequency as a loop in the application. The result of this would be that the sample often occurs at the same place in the loop, so it will think that opration is the most common operation, and a likely bottleneck. An analogy would be if you were
sudo perf record -F 99 -a -g --sleep 20
perf record中这么几个参数还蛮有意思:
-F, --freq <n> profile at this frequency -g enables call-graph recording -G, --cgroup <name> monitor event in cgroup name only
-g可以设置Cgroup,竟然用cgroup的名字做索引
-F 是采样的频率?
-F 99: sample at 99 Herz (samples per second), I'll sometimes sample faster than this (up to 999 Herz), but that also costs overhead. 99 Hert should be negligible. Also, the value '99' and not '100' is to avoid lockstep sampleing, which can produce skewed results.
lockstep 采样!
lockstep sampleing is when the profiling samples occur at the same frequency as a loop in the application. The result of this would be that the sample often occurs at the same place in the loop, so it will think that opration is the most common operation, and a likely bottleneck. An analogy would be if you were
相关文章推荐
- Linux perf: 为什么采样频率设置为99Hz而不是100Hz?
- linux下如何设置缺页频率和得到缺页率呢?
- 为什么要用Linux,而不是Windows作为服务器
- Linux查看与设置CPU频率
- 交叉编译工具链为什么是arm-linux-而不是arm-linux-gcc
- CD为什么采用44.1kHz采样频率的问题
- 为什么这么多Linux用户更喜欢命令行而不是GUI?
- 为什么用卷积滤波,而不是很简单的在频率领域内进行数据的频率处理
- Linux 操作系统的权限为什么是1,2,4 而不是 1,2,3?如何用二进制来做权限管理
- Linux设置默认启动命令行,而不是图形界面
- 为什么Linux下的环境变量要用大写而不是小写
- 简单描述为什么编译Android C程序所用的交叉编译工具链是arm-linux-androideabi-xx不是GNU开发的工具链arm-linux-gnueabi-xx?
- LINUX下安装ORACLE为什么要设置环境变量啊
- linux下安装gcc及设置多版本gcc多版本共存(如果enable静态库,会报错,不知道为什么,忽略静态库就没问题了)
- 为什么linux的TTY登录程序getty/agetty一般都会设置一个-L的option?
- linux下设置IP为什么每次重启后会自动变?
- 【转】新建maven工程为什么jdk会是默认版本 而不是自己设置的版本?
- 关于delegate为什么设置为assign而不是retain
- Linux0.00内核为什么要自己设置0x80号陷阱门来调用write_char过程?
- Linux关闭Tomcat为什么要用Kill,而不是shutdown.sh