在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. duilib之源码分析

    <duilib之源码分析>1 stdAfx.h * lengthof(x) 计算数组长度宏 * MAX  两值最大 * MIN  两值最小 * CLAMP(x,a,b) x在a,b之间则取 ...

  2. the Meta-Object Compiler (moc)

    the Meta-Object Compiler (moc) 元对象编译器是处理Qt的C++扩展的程序. moc工具读取C++头文件,如果它找到一个或者多个类声明包含Q_OBJECT宏.它生为那些类成 ...

  3. 关于js基础easy忘记的那些事儿

    1.Number() 通过这个函数转化后的值仅仅有两个:数值和NaN,通过parseInt也能转化为数值.可是像"134df"转化后的值为134,而Number("134 ...

  4. O2O难解餐饮行业趋势下行之困

    近几年,O2O这个名词越来越常见,我们不但能够在IT相关资讯栏目看到它的存在,甚至在一些综合新闻版面也能轻易看到. 诚然.线下商家结合线上引流这样的方法,能够带来不少订单,可是O2O是否就能够解决餐饮 ...

  5. HDU Wolf and Rabbit

    Description There is a hill with n holes around. The holes are signed from 0 to n-1. A rabbit must h ...

  6. 使用 jackson序列格式化日期

    [1]自定义时间,序列化类 [java] view plaincopy package com.fsti.bm.utils; import java.io.IOException; import ja ...

  7. 远程调用内核接口(remote call kernel)

    -------------------------------------------------------------------------------- 标题: 远程调用内核接口(remote ...

  8. PYTHON学习第二天[脑图][2]

    控制流语句:if , for ,while , break , continue

  9. check————身份证

    -- Access 不支持 Substring 查询,可以替换为 mid 查询. select 序号,姓名,身份证号,性别from 身份表where (len(身份证号)<>15 and ...

  10. Do not wait until the conditions are perfect to begin. Beginning makes the conditions perfect(转)

    名言金句总是不嫌多,美国<公司>杂志(Inc.)列出让你在 2015 年受用无穷的十大金句,每天选一则当作一天的心灵指导,不只学习前人的精神和智慧,也能转化成工作和生活的动力!Cheers ...