在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. 高级UIKit-03(NSFileManager、NSFileHandle)

    fileManager文件管理器 [day04_1_FileManager_Search] :查找文件 fileManager有一个方法可以判断文件是否是文件夹, fileExistsAtPath:i ...

  2. ZYSocket 4.3.5 SOCKET框架组 发布[NEW]

    最新代码请到 github: https://github.com/luyikk/ZYSOCKET 更新 4.3.5更新说明: 修复各种BUG. 重写了一份 protobuf-net 有什么用呢,不需 ...

  3. 2016年会成为Java EE微服务年吗?

    原文  http://www.infoq.com/cn/news/2016/02/javaee-microservices 进入2016年时间还不是很长,让我们回顾下去年年底的一个预言.去年12月,来 ...

  4. 利用git下载skia库

    1.准备好cygwin或者gitbash(github下载) 2.进入进入https://android.googlesource.com/,搜索skia,进入. 3.进入后最上面会显示下载方法:gi ...

  5. []: secureCRT连接ubuntu问题- The remote system refused the connection

    secureCRT连接ubuntu问题- The remote system refused the connection http://jxyang.iteye.com/blog/1484915 解 ...

  6. POJ 2404 Jogging Trails

    Jogging Trails Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2122   Accepted: 849 Des ...

  7. POI读入excel文件到Java中

    package Poi_Test; //导入java自带的包 import java.io.BufferedInputStream; import java.io.File; import java. ...

  8. Ansi,UTF8,Unicode,ASCII编码的差别

    近日须要不同的编码,关于上述编码,一直迷迷糊糊,查了些资料,总算大致了解了,以下全是从网上搜来的: 1.  ASCII和Ansi编码    字符内码(charcter code)指的是用来代表字符的内 ...

  9. Spring3 MVC 拦截器拦截不到的问题

    拦截器: com.zk.interceptors.MyInterceptor 实现了 HandlerInterceptor接口,可以拦截@RequestMapping注解的类和方法 第一种方式 < ...

  10. 程序实现LayoutAnimationController

    在res/anim下新建anim_set.xml: <?xml version="1.0" encoding="utf-8"?> <set x ...