歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux內核 >> Linux內核添加對OProfile 的支持

Linux內核添加對OProfile 的支持

日期:2017/2/28 16:10:24   编辑:Linux內核

工欲善其事,必先利其器,oprofile是分析性能的利器。廢話少說,直接上solution:

首先確定你的內核是否添加了對oprofile 的支持,方法是看內核的啟動信息,如果有如下兩行的,說明你的內核支持oprofile:

oprofile: hardware counters not available

oprofile: using timer interrupt.

如果沒有就需要在內核中添加對oprofile的支持:

1 在/arch/unicore(按照你的實際情況)/ 下建立oprofile 文件夾 ,在oprofile中是makefile 將/driver/oprofile中的文件編譯

2 在/arch/unicore/kconfig 中將 config STACKTRACE_SUPPORT default 選為 y

3 make menuconfig 添加oprofile選項 make menuconfig general step 中 profiling support 和 oprofile system profiling

這樣就好了。

Copyright © Linux教程網 All Rights Reserved