首页
登录 | 注册

几篇关于oprofile分析性能的文章

下面是使用oprofile分析性能的一些命令。
  1. [root@10-150-110-85 samples]# opcontrol --start
  2. Profiler running.
  3. [root@10-150-110-85 samples]# opcontrol --stop
  4. Stopping profiling.
  5. [root@10-150-110-85 samples]# opcontrol --help
  6. opcontrol: usage:
  7. -l/--list-events list event types and unit masks
  8. -?/--help this message
  9. -v/--version show version
  10. --init loads the oprofile module and oprofilefs
  11. --setup give setup arguments (may be omitted)
  12. --status show configuration
  13. --start-daemon start daemon without starting profiling
  14. -s/--start start data collection
  15. -d/--dump flush the collected profiling data
  16. -t/--stop stop data collection
  17. -h/--shutdown stop data collection and kill daemon
  18. -V/--verbose[=all,sfile,arcs,samples,module,misc,ext]
  19. be verbose in the daemon log
  20. --reset clears out data from current session
  21. --save=name save data from current session to session_name
  22. --deinit unload the oprofile module and oprofilefs
  23. -e/--event=eventspec
  24. Choose an event. May be specified multiple times. Of the form
  25. "default" or "name:count:unitmask:kernel:user", where :
  26. name: event name, e.g. CPU_CLK_UNHALTED or RTC_INTERRUPTS
  27. count: reset counter value e.g. 100000
  28. unitmask: hardware unit mask e.g. 0x0f
  29. kernel: whether to profile kernel: 0 or 1
  30. user: whether to profile userspace: 0 or 1
  31. -p/--separate=type,[types]
  32. Separate profiles as follows :
  33. none: no profile separation
  34. library: separate shared library profiles per-application
  35. kernel: same as library, plus kernel profiles
  36. thread: per-thread/process profiles
  37. cpu: per CPU profiles
  38. all: all of the above
  39. -c/--callgraph=#depth enable callgraph sample collection with a
  40. maximum depth. Use '0' to disable callgraph
  41. profiling.
  42. --session-dir=dir place sample database in dir instead of
  43. default location (/var/lib/oprofile)
  44. -i/--image=name[,names] list of binaries to profile (default is "all")
  45. --vmlinux=file vmlinux kernel image
  46. --no-vmlinux no kernel image (vmlinux) available
  47. --kernel-range=start,end kernel range vma address in hexadecimal
  48. --buffer-size=num kernel buffer size in sample units.
  49. Rules: A non-zero value goes into effect after
  50. a '--shutdown/start' sequence. A value of
  51. zero sets this parameter back to default value
  52. but does not go into effect until after a
  53. '--deinit/init' sequence.
  54. --buffer-watershed kernel buffer watershed in sample units (2.6
  55. kernel). Same rules as defined for
  56. buffer-size.
  57. --cpu-buffer-size=num per-cpu buffer size in units (2.6 kernel)
  58. Same rules as defined for buffer-size.
  59. --note-table-size kernel notes buffer size in notes units (2.4
  60. kernel)
  61. --xen Xen image (for Xen only)
  62. --active-domains= List of domains in profiling session (for Xen)
  63. (list contains domain ids separated by commas)
  64. [root@10-150-110-85 samples]# oprofile stop
  65. -bash: oprofile: command not found
  66. [root@10-150-110-85 samples]# oprofile --stop
  67. -bash: oprofile: command not found
  68. [root@10-150-110-85 samples]# opcontrol --stop
  69. [root@10-150-110-85 samples]# opcontrol -l|more
  70. oprofile: available events for CPU type "Intel Sandy Bridge microarchitecture"
  71. See Intel Architecture Developer's Manual Volume 3B, Appendix A and
  72. Intel Architecture Optimization Reference Manual (730795-001)
  73. For architectures using unit masks, you may be able to specify
  74. unit masks by name. See 'opcontrol' man page for more details.
  75. CPU_CLK_UNHALTED: (counter: all)
  76. Clock cycles when not halted (min count: 6000)
  77. UNHALTED_REFERENCE_CYCLES: (counter: all)
  78. Unhalted reference cycles (min count: 6000)
  79. Unit masks (default 0x1)
  80. ----------
  81. 0x01: No unit mask
  82. INST_RETIRED: (counter: all)
  83. number of instructions retired (min count: 6000)
  84. LLC_MISSES: (counter: all)
  85. Last level cache demand requests from this core that missed the LLC (min count: 6000)
  86. Unit masks (default 0x41)
  87. ----------
  88. 0x41: No unit mask
  89. LLC_REFS: (counter: all)
  90. Last level cache demand requests from this core (min count: 6000)
  91. Unit masks (default 0x4f)
  92. ----------
  93. 0x4f: No unit mask
  94. BR_INST_RETIRED: (counter: all)
  95. number of branch instructions retired (min count: 500)
  96. BR_MISS_PRED_RETIRED: (counter: all)
  97. number of mispredicted branches retired (precise) (min count: 500)
  98. ld_blocks: (counter: all)
  99. blocked loads (min count: 100000)
  100. Unit masks (default 0x1)

link 1 http://www.ibm.com/developerworks/cn/linux/l-oprof/
link 2 http://www.oenhan.com/oprofile-cpu-analysis
link 3 http://www.lenky.info/archives/2012/03/1371

相关文章

  • 漫谈linux文件IO
        在Linux 开发中,有几个关系到性能的东西,技术人员非常关注:进程,CPU,MEM,网络IO,磁盘IO.本篇文件打算详细全面,深入浅出.剖析文件IO的细节.从多个角度探索如何提高IO性能.本文尽量用通俗易懂的视角去阐述.不copy ...
  • 目前形势,参加到iOS队伍的人是越来越多,甚至已经到供过于求了. 由于我面试公司比较多,所以自然也是做了这方面的准备,因此这篇总结并不一定适合想去创业公司的同学.另外,由于经验本来就是主观性极强的东西,加之笔者水平有限,所以如果有不认可的地 ...
  • MySQL学习分享--Thread pool
    刚刚经历了淘宝的双11,真实感受到了紧张的氛围.尽管DB淡定的度过,但是历程中的波折,可谓惊心动魄.其中MySQL在大量连接(万级)的场景下,表现出性能远远低于预期,并且出现明显的波动,成为一个非常重要的问题.问题虽然解决,但是后续的思考和 ...
  • 《循序渐进Linux》第二版即将出版发行(附封面)
    从<循序渐进Linux>第一版发布,到现在已经近6年了,6年的时间,技术发生了很大的变化,Linux系统的内核版本从2.6.9(RHEL4.x)已经更新到了现在的3.10(Centos7.x),第一版中的部分内容已经陈旧,Lin ...
  • 简单描述PHP发展历程
    PHP(外文名:PHP: Hypertext Preprocessor,中文名:"超文本预处理器")是一种通用开源脚本语言.语法吸收了C语言.Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域.PHP ...
  • Java EE 常见性能问题解决手册(4)
    设置一个饱和的池,然后逐步减少连接池大小,一直到CPU占用率为75%到85%之间,同时用户负载正常.如果等待队列大小实在无法控制,考虑下面2中建议: 1.把你的程序放入代码模拟器运行,调整程序代码 2.增加额外的硬件 如果你的用户负载超过了 ...

2020 unjeep.com webmaster#unjeep.com
12 q. 0.011 s.
京ICP备10005923号