linux Ubuntu16.04 oprofile1.1.0 编译笔记

内核支持:

.config 文件选项

CONFIG_PROFILING=y  

CONFIG_OPROFILE=y 

重新编译,替换内核,重启系统


下载源代码:

wget http://prdownloads.sourceforge.net/oprofile/oprofile-1.1.0.tar.gz


解压:

tar -zxcf  oprofile-1.1.0.tar.gz


编译:

预备工作:

 sudo apt-get install binutils-dev libiberty-dev libpopt-dev -y  

1.     ./configure


但是出现下面警告,

Warning: The user account 'oprofile:oprofile' does not exist on the system.
         To profile JITed code, this special user account must exist.
         Please ask your system administrator to add the following user and group:
             user name : 'oprofile'
             group name: 'oprofile'
         The 'oprofile' group must be the default group for the 'oprofile' user.

这个错误不能忽略,如果这个不解决,后面执行也会出错.

意思是需要添加指定用户,原因不想翻译,

sudo groupadd oprofile

sudo useradd -g oprofile oprofile


2.    make

3.    sudo make install

4.   测试程序

 sudo operf ./sandiego_osg_es2

sandiego_osg_es2 是我自己测试的程序,用自己的需要测试的替换.
Your kernel's Performance Events Subsystem does not support your processor type.


fuck...

Note

Some older processor models are not supported by the underlying perf_events kernel and, thus, are not supported by  operf . If you receive the message
  Your kernel's Performance Events Subsystem does not support your processor type
when attempting to use  operf , install OProfile 0.9.9 and try profiling with  opcontrol  to see if your processor type may be supported by OProfile's legacy mode.


原来是我的CPU太信了,不支持,~~~~呜呜~~~~




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值