在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. 基于visual Studio2013解决算法导论之010快排中应用插入排序

     题目 快排中引用插入排序 解决代码及点评 #include <stdio.h> #include <stdlib.h> #include <malloc.h> ...

  2. MFC:重绘Button,定制CButton,自画CPngButton,求赐教(各种bug包括性能bug)谢谢谢谢

    [1.]CPngButton.h(资源是最后图片) #pragma once #include<atlimage.h> #define PNUM 19 #define PLAYTIME 1 ...

  3. FileStream -- 复制文件

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  4. 基于集合成工控机Ubuntu系统安装分区详解

    基于集合成工控机Ubuntu系统安装分区详解 硬件描述:双核的CPU,128G的固态硬盘 软件描述:使用Ubuntu12.04系统,内核3.8.0-29版本,QT4.8.1版本 1.新建分区表 /de ...

  5. Project configuration is not up-to-date with pom.xml错误解决方法

    导入一个Maven项目之后发现有一个如下的错误: Project configuration is not up-to-date with pom.xml. Run project configura ...

  6. 基于visual Studio2013解决C语言竞赛题之1016循环打印矩阵

         题目 解决代码及点评 /* 找规律,编程序打印6×6的矩阵: 1 2 3 5 8 13 1 4 9 17 30 51 1 6 19 45 92 173 . . . */ ...

  7. hdu5338 ZZX and Permutations

    hdu5338 ZZX and Permutations 非原创,来自多校题解 不是自己写的,惭愧ing…… 留着以后自己参考…… lower_bound {1,2,4,5} 询问 2,返回的是 2 ...

  8. bottle-session 0.3 : Python Package Index

    bottle-session 0.3 : Python Package Index bottle-session 0.3

  9. asp.net2.0安全性(1)--用户角色篇(代码实现2)--转载来自车老师

    加载所有用户 MembershipUserCollection user = Membership.GetAllUsers(); listUser.DataSource = user; listUse ...

  10. java内存管理简析

    作为java程序员,因为有虚拟机的自动内存管理,所以不需要再向C和C++程序员那样灾区写delete和free方法,但是java中是不是就不存在内存泄露问题呢,答案是否定的,java中一样存在内存泄漏 ...