Linux内核添加对OProfile 的支持

工欲善其事,必先利其器,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_SUPPORTdefault 选为 y

3 make menuconfig 添加oprofile选项 make menuconfig general step 中 profiling support 和 oprofile system profiling

这样就好了。

飞机一阵抖动,我终于说出了最后一句再见。

Linux内核添加对OProfile 的支持

相关文章:

你感兴趣的文章:

标签云: