当前位置:  技术问答>linux和unix

arm11下Oprofile的使用

    来源: 互联网  发布时间:2016-05-28

    本文导语:  有没人在arm11下用过Oprofile? kernel:2.6.21.5 board:s3m6400 cpu:arm1176jz 问题: #opcontrol -e ###:##:#####//设置enent eval: line 1: timer: not found You cannot specify any performance counter events because OProfile is in timer mode. /dev/Oprofile/cpu_typ...

有没人在arm11下用过Oprofile?
kernel:2.6.21.5
board:s3m6400
cpu:arm1176jz

问题:
#opcontrol -e ###:##:#####//设置enent
eval: line 1: timer: not found
You cannot specify any performance counter events
because OProfile is in timer mode.

/dev/Oprofile/cpu_type :timer

我已参照maemo上的800介绍patch了Oprofile对ARM11的支持,但还是由于模式为timer interrupt,所以无法获得cpu事件,
其实也就是所有事件都无法setup.监测程序的函数调用什么的都正常.只是事件无法绑定.
有没人解决过这个问题,万分感谢.
ps:Oprofile已交叉编译,objdump,objcopy都是交叉编译的可用.kernel的Profile已打开.

|
oprofile 在Linux 上分两部分,一个是内核模块(oprofile.ko),一个为用户空间的守护进程(oprofiled)。前者负责访问性能计数器或者注册基于时间采样的函数(使用register_timer_hook注册之,使时钟中断处理程序最后执行profile_tick 时可以访问之),并采样置于内核的缓冲区内。后者在后台运行,负责从内核空间收集数据,写入文件。


1. kernel patch

完整之 patch 位于: http://people.openrays.org/~comcat/patch/patch-2.6.18-oprofile-comcat

主要是当计数器溢出(31位为1)时,触发IP6 中断,其处理程序的 godson2e_pmc_handler 的编写。

注意一下在用户空间设置的样本计数,在内核空间是怎么处理的。例如使用

opcontrol --setup --event=CYCLES:1000 设置样本计数为1000,

则计数器被初始化的值为0x8000 0000 - 1000
即: CYCLES 事件发生 1000 次后,计数溢出,触发处理程序 godson2e_pmc_handler 添加一个样本 add_sample。

diff -uNr src/arch/mips/oprofile/op_model_godson2e.c pmc/arch/mips/oprofile/op_model_godson2e.c
--- src/arch/mips/oprofile/op_model_godson2e.c    1970-01-01 08:00:00.000000000 +0800
+++ pmc/arch/mips/oprofile/op_model_godson2e.c    2007-05-25 14:59:54.000000000 +0800
@@ -0,0 +1,171 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2007 by comcat 
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include "op_impl.h"
+
+#define GODSON2E_PERFCTL_EXL              (1UL  

    
 
 

您可能感兴趣的文章:

  • arm11下oprofile的使用
  • 请问哪有 arm-linux-nm, arm-linux-addr2line等等这些工具的使用说明~~~
  • 使用eclipse 加入arm-elf-gcc 或arm-linux-gcc 编译器为什么不好使
  • 使用arm-linux-gcc编译,出现compilation of header file requested错误
  • arm+linux下,中断怎么使用呢?
  • 如何使用arm-uclibc-gcc将.c文件编译生成.a,将.c文件编译生成.cgi?
  • 为arm平台写了个使用sdl的测试程序衔接时出现skipping incompatible然后就提示cannot find -lSDL了
  • arm-elf-gcc编译时如何强制其使用长指针?
  • 请教使用arm-linux-gcc 3.4.1 如何交叉编译linux 2.6的内核模块?
  • 初学者请大家推荐书籍:关于Linux的使用,Linux下的c编程,ARM编程等方面[问题点数:30分]
  • ubuntu下使用DNW连接ARM2440问题
  • 使用arm-linux-gdb 调试u-boot 在Starting target CPU..卡死
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 关于买ARM9或ARM11的开发板的问题~~~
  • 现在是ARM9还是ARM11比较流行啊?我想买开发板什么牌子的比较好啊,我是大学生。
  • ARM11 UBOOT移植问题
  • java命名空间javax.swing类defaultbuttonmodel的类成员方法: armed定义及介绍
  • arm-elf-gcc 和 arm-linux-gcc有什么区别?arm-elf-gcc里的elf代表什么?
  • java命名空间javax.accessibility类accessiblestate的类成员方法: armed定义及介绍
  • arm-unknown-linux-gnu-gcc與arm-linux 的compiler有不同嗎
  • make ARCH=arm CROSS_COMPILE=arm-linu-错误
  • ARM ping不通虚拟机,虚拟机可以ping通ARM
  • 疑惑softfloat的问题,并求arm-linux-gcc和arm-linux-softfloat-gcc4.1.1
  • 新手请教 移植2.6内核到arm9,芯片:arm926ejs,Flash: NOR
  • 请教:make ARCH=arm CROSS_COMPILE=arm-linu- menuconfig出错
  • arm-linux-gcc 交叉编译poco-1.3.5-all 报错stlport_arm_linux_gcc库找不到
  • 关于arm 2440 选择arm-linux-gcc编译器版本的问题
  • 字节对齐 ARM VS Not ARM,经验人士请指点!!
  • ARM开发怎么实现域名解析呢,ARM板能ping通IP,不能ping通域名?
  • 关于ARM的几个基本概念
  • arm linux 2.6.29 下载初级问题,大家指教
  • 关于ARM内核编译
  • arm-elf-gcc问题
  • ARM linux学习的问题
  • 从x86到arm只需要改Makefile吗?
  • arm-linux-gcc编译XML错误
  • 编译linux->ARM平台?100分


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3