Chinaunix首页 | 论坛 | 博客
  • 博客访问: 463417
  • 博文数量: 108
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1134
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-29 19:43
文章分类

全部博文(108)

文章存档

2016年(10)

2015年(9)

2014年(73)

2013年(16)

我的朋友

分类: 服务器与存储

2014-08-27 14:36:13

下面是使用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 
link 3 
阅读(1251) | 评论(0) | 转发(0) |
0

上一篇:redis php

下一篇:Python re.match

给主人留下些什么吧!~~