您的位置:首页 > 运维架构 > Linux

linux Ubuntu16.04 oprofile1.1.0 编译笔记

2017-05-17 16:30 387 查看
内核支持:

.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太信了,不支持,~~~~呜呜~~~~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: