使linux内核支持perf的配置

来源:互联网 发布:软件架构师证书 编辑:程序博客网 时间:2024/06/03 15:10

配置内核支持PERF


make menuconfig


CONFIG_HAVE_PERF_EVENTS=y

CONFIG_PERF_USE_VMALLOC=y

这两项不知道在 menuconfig中怎么找,但是可以在make menuconfg保存退出后,vi到.config中查找配置。


General setup->

Kernel Performance Events And Counters  --->

[*] Kernel performance events and counters                                                                                                                               

[ ] Kernel performance counters (old config option)                                                

[ ] Debug: use vmalloc to back perf mmap() buffers   


配置此项即为配置.config中如下两项

CONFIG_PERF_EVENTS=y

CONFIG_PERF_COUNTERS=y


.config 中相关的配置如下


CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y


#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_PERF_COUNTERS is not set
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y




1 0
原创粉丝点击