linux中Dcumentation目錄下的basic_profiling.txt文檔翻譯

來源:互聯網
上載者:User

標籤:linux 翻譯   profiling   

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 ;-)    ([email protected])
Thanks to John Levon, Dave Hansen, et al. for help writing this.
這些命令是故意讓他們非常基礎的。如果你想理解的更加清楚一些的話,去閱讀真實的文檔。
請不要增加更多的事物,但是請一定要糾正我的錯誤([email protected])。
特別感謝John Levon, Dave Hansen等人協助編寫這個文檔。


<test> is the thing you‘re trying to measure.
Make sure you have the correct System.map / vmlinux referenced!
IMHO it‘s easier to use "make install" for linux and hack /sbin/installkernel
to copy config files, system.map, vmlinux to /boot.
<test>命令是你想要去測試的事情。請確認你由正確的System.map / vmlinux引用。使用"make install"
命令和裁剪/sbin.installkernel來複製設定檔,system.map,vnlinux到/boot目錄下是非常簡單的。




Readprofile
Readprofile命令
-----------
You need a fixed readprofile command for 2.5 ... either get hold of
a current version from:
http://www.kernel.org/pub/linux/utils/util-linux/
在核心2.5中你需要一個固定的readprofile命令,你可以通過網站http://www.kernel.org/pub/linux/utils/util-linux/
擷取一個最新的版本。
or get readprofile binary fixed for 2.5 / akpm‘s 2.5 patch from 
ftp://ftp.kernel.org/pub/linux/kernel/people/mbligh/tools/readprofile/
或者是從ftp://ftp.kernel.org/pub/linux/kernel/people/mbligh/tools/readprofile/
擷取一個固定的2.5/akpm‘s核心的readprofile二進位補丁。


Add "profile=2" to the kernel command line.
添加"profile=2"到核心命令列中。


clear readprofile -r             清除 readprofile -r參數
<test>
dump output readprofile -m /boot/System.map > captured_profile   重新導向輸出檔案 readprofile -m /boot/System.map > captured_profile


Oprofile
--------
get source (I use 0.5) from http://oprofile.sourceforge.net/
從網站http://oprofile.sourceforge.net/擷取源碼(我使用的是0.5版本)。
add "idle=poll" to the kernel command line 
添加"idle=poll"到核心命令列中。
Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
配置 CONFIG_PROFILING=y 和 CONFIG_OPROFILE=y,並且在新核心中重新啟動
./configure --with-kernel-support
./configure  --核心支援


make install   執行安裝指令 


One time setup (pick appropriate one for your CPU):
一次安裝(為你的CPU挑選適當的一個)
P3 opcontrol --setup --vmlinux=/boot/vmlinux \
--ctr0-event=CPU_CLK_UNHALTED --ctr0-count=100000
Athlon/x86-64 opcontrol --setup --vmlinux=/boot/vmlinux \
--ctr0-event=RETIRED_INSNS --ctr0-count=100000
P4 opcontrol --setup --vmlinux=/boot/vmlinux \
--ctr0-event=GLOBAL_POWER_EVENTS \
--ctr0-unit-mask=1 --ctr0-count=100000


start daemon opcontrol --start-daemon
clear opcontrol --reset
start opcontrol --start
<test>
stop opcontrol --stop
dump output(重新導向輸出) oprofpp -dl -i /boot/vmlinux  >  output_file

linux中Dcumentation目錄下的basic_profiling.txt文檔翻譯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.