zoukankan      html  css  js  c++  java
  • MIPS平台目标机安装Oprofile时出现error

    在Debian下安装Oprofile

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

    .config 文件中设置CONFIG_PROFILING=yCONFIG_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’ .
     即可成功编译。
     
     
  • 相关阅读:
    springmvc实现文件上传
    springmvc乱码及restful
    springmvc数据的处理
    springmvc跳转方式
    controller配置
    SpringMVC Annotation
    SpringMVC基本包
    第一章 面向对象软件工程与UML
    Oracle数据库之PL/SQL程序基础设计
    thinkphp5 给CSS JS 添加版本号
  • 原文地址:https://www.cnblogs.com/snake-hand/p/3146970.html
Copyright © 2011-2022 走看看