在Debian下安装Oprofile

重要:应该使linux内核选项支持

在 .config 文件中设置CONFIG_PROFILING=y和CONFIG_OPROFILE=y。

重新编译,烧写。使用apt-get update && apt-get install oprofile oprofile-gui

或手工安装直接从网上下载oprofile-0.9.8。

Oprofile默认需要这些库的支持: 由GNUmaintain的libbfd.so及libiberty.so

编译和安装最新的biutils工具集。binutils-2.22.tar.gz.

在 /usr/local/lib/ 目录下生成静态库 libbfd.a和libiberty.a。
 
但oprofile需要动态库,所以需要修改oprofile/libopangent/Makefile文件使之支持静态库。
修改如下:
BFD_LIBS = -lbfd -liberty -ldl -lz => BFD_LIBS = -static-libbfd -static-libiberty -ldl -lz
其他的可修改
如果linux kernel 版本是2.6.35+,应该会出现以下错误:
operf_utils.cpp:735: error: ‘PERF_RECORD_MISC_GUEST_KERNEL’ was not declared in this scope
operf_utils.cpp:738: error: ‘PERF_RECORD_MISC_GUEST_USER’ was not declared in this scope
参考文件/usr/include/linux/perf_event.h
把 ‘PERF_RECORD_MISC_GUEST_KERNEL’ 改成‘PERF_RECORD_MISC_KERNEL’,
     ‘PERF_RECORD_MISC_GUEST_USER’ 改成 ‘PERF_RECORD_MISC_USER’ .
 即可成功编译。
 
 

MIPS平台目标机安装Oprofile时出现error的更多相关文章

  1. ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library

    ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library 须要安装pcre包. sudo apt-get upd ...

  2. .net应用程序安装部署时异常 Error 1001. 在初始化安装时发生异常 System.BadImageFormatException:未能加载文件或程序集 的解决办法【成功解决】

    采用.net 4.0框架开发的一个桌面应用程序在某学校的一体机(Windows7的32位操作系统)上做安装部署时抛出异常,安装程序回滚,多次尝试仍不成功. Error 1001. 在初始化安装时发生异 ...

  3. Python安装pywinauto时遇到error: The read operation timed out解决方法

    Python结合Pywinauto 进行 Windows UI 自动化,安装pywinauto时遇到的一些问题: 解决方法:很明显是链接超时国外网站你懂的V_P_N吧,直接通过报错信息的链接复制到浏览 ...

  4. 安装nodejs时:The error code is 2503.

    在windows下安装nodejs时老是报错: The installer has encountered an unexpected error installing . 有三种方法可以尝试: &q ...

  5. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  6. 安装软件时出现error 1337 【添加权限】

    Error 1317 An error occurred while attempting to create the directory Drive Name:\Folder Name https: ...

  7. 安装Pod时提示ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod

    环境:OSX EI 10.11.1 昨天切换gem源后,招待pod安装没有任何问题,也可以正常用$ gem sources --add https://ruby.taobao.org/ --remov ...

  8. pip 安装模块时出现error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":

    在使用pip安装mysqlclient模块时,出现如下错误: 在网上查找资料后显示可能是由于不兼容导致的,最好去下载.whl文件安装成功. 资源地址:http://www.lfd.uci.edu/~g ...

  9. an安装jenkins时遇到ERROR: No Java executable found in current PATH: /bin:/usr/bin:/sbin:/usr/sbin的问题

    # sudo /etc/init.d/jenkins restartERROR: No Java executable found in current PATH: /bin:/usr/bin:/sb ...

随机推荐

  1. Robot Framework: 自定义自己的python库

    利用Robot Framework编写测试用例,往往需要开发自己的关键字,有的关键字需要通过自己编写python代码来实现.这在rf中,就需要自己定义python库.这个过程其实不复杂,本文来介绍下. ...

  2. 用ATL写简单的ActiveX控件 .

    我正在做的项目需要用读卡器来读数据,由于系统是B/S架构的所以只能把读卡器的驱动封装成一个无界面的ActiveX控件,这样web页面中的js代码才能访问读卡器其实做起来也挺简单的,我用的环境是VS20 ...

  3. cocos2d-x的经历(含源码——)

    源于手游的火爆和大环境的影响,最近在学习cocos2d-x.其实以前一直有想搞andriod和ios的尝试,可惜本屌丝没钱买mac os x,只好先开始学习andriod,于是买了小米2s作为测试机, ...

  4. javascript笔记整理(对象的继承顺序、分类)

    Object.prototype.say=function(){ alert("我是顶层的方法"); } children.prototype=new parent(); pare ...

  5. Windows下用WinSCP传输数据到Linux上

    Scenario:最近公司做的一个项目,UI部分我是使用python在编译时做localization的,是linux下运行的,但是开发是在windows下进行的每次编译后都要手动通过WinSCP这个 ...

  6. 什么是透明(和Windows主题有关系),研究TLable和TPanel是两个好例子

    在controls.pas单元里只有判断,没有赋值,所以一直不是很明白.于是在stdCtrls.pas里找了几个例子,直观加深一下印象: constructor TCustomLabel.Create ...

  7. ibatis通过Map封装参数调用存储过程

    一.存储过程如下(领导写的) CREATE OR REPLACE PROCEDURE agent_UIMOrIMEICheck_pro ( I_CARD_NO IN VARCHAR2, --UIM卡或 ...

  8. 执行shell脚本提示“syntax error near unexpected token for((i=0;i<$length;i++))”

    sh脚本例如以下: #!/usr/bin/env bash county="3 4 5 6 7 8 9 10 11 12 16 29 39 44 53 62 72 84 97 115 128 ...

  9. Oracle_Database_11g_标准版_企业版__下载地址_详细列表

    Oracle_Database_11g_标准版_企业版__下载地址_详细列表 Oracle Database 11g Release 2 Standard Edition and Enterprise ...

  10. EasyUI - Combo组件

    -自定义下拉组件,有别于ComboBox下拉组件. 效果: html代码: <input id ="box" /> <div id ="fruits&q ...