Documentation/basic_profiling.txt
来源:互联网 发布:js设置option选中 编辑:程序博客网 时间:2024/04/28 01:49
Chinese translated version of Documentation/basic_profiling.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 秦芹 18768122412@163.com
---------------------------------------------------------------------
Documentation/basic_profiling.txt的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 秦芹 18768122412@163.com
中文版翻译者:秦芹 18768122412@163.com
以下为正文
---------------------------------------------------------------------
These instructions are deliberately very basic. If you want something clever,
go read the real docs ;-) Please don't add more stuff, but feel free to
correct my mistakes ;-) (mbligh@aracnet.com)
Thanks to John Levon, Dave Hansen, et al. for help writing this.
这些介绍是计算机科学技术里很基础的,如果你想要看一些比较深入的知识,
请阅读另外一些深入的文档,在不要添加更多的资料的基础上,认真纠正我
的错误(mbligh@aracnet.com)
谢谢John Levon, Dave Hansen等人对写这片文章的帮助。
<test> is the thing you're trying to measure.
Make sure you have the correct System.map / vmlinux referenced!
你应该试着测试一下,确保存在System.map / vmlinux目录。
It is probably easiest to use "make install" for linux and hack
/sbin/installkernel to copy vmlinux to /boot, in addition to vmlinuz,
config, System.map, which are usually installed by default.
对于linux这非常容易使用 make instal,回到/sbin/installkernel 目录
复制vmlinux到/boot,除了vmlinux配置System.map通常是默认安装的。
Readprofile
-----------
A recent readprofile command is needed for 2.6, such as found in util-linux
2.12a, which can be downloaded from:
http://www.kernel.org/pub/linux/utils/util-linux/
Most distributions will ship it already.
最近readprofile的命令要求的版本是2.6,因此如果发现util-linux的版本是2.12a,
你就应该从http://www.kernel.org/pub/linux/utils/util-linux/下载:
大多数分布应该已经发行。
Add "profile=2" to the kernel command line.
增加"profile=2"到kernel命令行。
clear readprofile -r
<test>
dump output readprofile -m /boot/System.map > captured_profile
Oprofile
--------
Get the source (see Changes for required version) from
http://oprofile.sourceforge.net/ and add "idle=poll" to the kernel command
line.
Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
./configure --with-kernel-support
make install
得到资源后(看一下不同点从要求的版本)从http://oprofile.sourceforge.net/增加idle=poll
到kernel命令行。
配置CONFIG_PROFILING=y and CONFIG_OPROFILE=y和重新配置kernel
For superior results, be sure to enable the local APIC. If opreport sees
a 0Hz CPU, APIC was not on. Be aware that idle=poll may mean a performance
penalty.
对于这个结果,应该确保本地的APIC如果从报告中看出0HZCPU
和APIC也没启动,则意味着idle=poll指令失败了。
One time setup:
下面为一次启动过程:
opcontrol --setup --vmlinux=/boot/vmlinux
clear opcontrol --reset
start opcontrol --start
<test>
stop opcontrol --stop
dump output opreport > output_file
To only report on the kernel, run opreport -l /boot/vmlinux > output_file
A reset is needed to clear old statistics, which survive a reboot.
对于这个仅仅运行在内核上的报告,执行opreport -l /boot/vmlinux > output_file
为了清除旧的数据统计,重新启动复位是必须的。
- Documentation/basic_profiling.txt
- linux中Dcumentation目录下的basic_profiling.txt文档翻译
- Documentation/devices.txt
- Documentation/sched-bwc.txt
- Documentation/timers/hpet.txt
- Documentation/input/cd32.txt
- Documentation/x86/pat.txt
- Documentation/filesystems/xip.txt
- Documentation/zorro.txt
- Documentation-spiep93xx-spi.txt
- Documentation/dvb/readme.txt
- Documentation-spi-pxa2xx.txt
- Documentation/io-mapping.txt
- Documentation/xtensa/mmu.txt
- Documentation/usb/anchors.txt
- Documentation-power-states.txt
- Documentation-usb-authorization.txt
- Documentation-usb-anchors.txt
- Documentation/devicetree/bindings/xilinx.txt
- 洗牌算法汇总以及测试洗牌程序的正确性
- VC 调用C#写的COM组件注意事项
- cocos2d-x2.2.2(2.1.4及以上版本) VS2012 创建跨平台项目秒杀方法
- linux 命令备份
- Documentation/basic_profiling.txt
- 冒泡排序法---排序算法(三)
- CString的多种初始化
- 统一资源管理与调度平台(系统)介绍
- 破解
- 自动清除firefox缓存
- listview android:footerDividersEnabled这个属性无效果
- iOS获取本地音乐播放
- poj 2429 (分解质因子)