oProfile简介

oProfile

  OProfile是Linux内核支持的一种性能分析机制。 [1]
  它在时钟中断处理入口处建立监测点,记录被中断的上下文现场,由配套的用户态的工具oprof_start负责在用户态收集数据,opreport则分析数据并给出分析报告。 [1]
  Oprofile 是用于 Linux 的若干种评测和性能监控工具中的一种,它可以工作在不同的 体系结构上,包括 IA32, IA64 和 AMD Athlon 系列。Oprofile 包含在 Linux 2.5 和更高版本的 内核中,也包含在大多数较新的 Linux 版本中,包括 Red Hat 9 。

编辑本段特点

  oprofile 是 Linux 平台上的一个功能强大的 性能分析工具, 支持两种采样(sampling)方式:基于事件的采样(event based)和基于时间的采样(time based)。
  基于事件的采样是oprofile只记录特定事件(比如L2 cache miss)的发生次数,当达到用户设定的 定值时oprofile 就记录一下(采一个样)。这种方式需要CPU 内部有性能计数器(performace counter)。
  基于时间的采样是oprofile 借助OS  时钟中断的机制,每个时钟中断 oprofile 都会记录一次(采一次样)。引入的目的在于,提供对没有性能计数器 CPU 的支持。其精度相对于基于事件的采样要低。因为要借助 OS  时钟中断的支持,对禁用中断的代码oprofile不能对其进行分析。
  oprofile 在Linux 上分两部分,一个是 内核模块(oprofile.ko),一个为 用户空间守护进程(oprofiled)。前者负责访问性能计数器或者注册基于时间采样的函数(使用register_timer_hook注册之,使 时钟中断处理程序最后执行profile_tick 时可以访问之),并采样置于 内核的缓冲区内。后者在后台运行,负责从 内核空间收集数据,写入文件。
  Oprofile 工具概述:
   op_help: 列出可用的事件,并带有简短的描述 opcontrol: 控制 Oprofile 的 数据收集 oprofpp: 检索有用的评测数据 op_time: 为系统上的所有映像列出相关的评测值 op_to_source: 产生带注解的源文件、汇编文件或源文件和汇编文件的混合 op_merge: 合并属于同一个应用程序的采样文件 op_import: 将采样 数据库文件从外部格式(abi)转换为本地格式
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是更全面的 Linux 内核 Debug 技术的推荐,共100个: 1. printk 2. kdb 3. kgdb 4. kdump 5. kexec 6. ftrace 7. SystemTap 8. LTTng 9. perf 10. oprofile 11. kprobes 12. dynamic-debug 13. kcov 14. kasan 15. kmemleak 16. kcsan 17. ktsan 18. kasan-runtime 19. kretprobe 20. uprobes 21. trace-cmd 22. debugfs 23. sysfs 24. procfs 25. kernelshark 26. crash 27. memtest86+ 28. valgrind 29. gdb 30. strace 31. eBPF 32. bcc 33. stapbpf 34. kpatch 35. ksplice 36. kprobes on tracepoints 37. LKDTM 38. syzkaller 39. fuzzing 40. static code analysis 41. clang analyzer 42. Coverity 43. Infer 44. sparse 45. smatch 46. coccinelle 47. gcc plugins 48. kernelbuild 49. kernelci 50. kernelci-dashboard 51. kbuild test 52. kselftest 53. kunit 54. ktest 55. kasan-tests 56. kmemleak-tests 57. kcsan-tests 58. ktsan-tests 59. kretprobe-tests 60. uprobes-tests 61. ftrace-tests 62. LTTng-tests 63. perf-tests 64. oprofile-tests 65. kprobes-tests 66. dynamic-debug-tests 67. kcov-tests 68. kasan-tests 69. kmemleak-tests 70. kcsan-tests 71. ktsan-tests 72. kasan-runtime-tests 73. kretprobe-tests 74. uprobes-tests 75. trace-cmd-tests 76. debugfs-tests 77. sysfs-tests 78. procfs-tests 79. kernelshark-tests 80. crash-tests 81. memtest86+-tests 82. valgrind-tests 83. gdb-tests 84. strace-tests 85. LKDTM-tests 86. syzkaller-tests 87. fuzzing-tests 88. static code analysis tests 89. clang analyzer tests 90. Coverity tests 91. Infer tests 92. sparse tests 93. smatch tests 94. coccinelle tests 95. gcc plugins tests 96. kpatch-tests 97. ksplice-tests 98. kernelboot 99. bootchart 100. boot validation 这些技术在 Linux 内核 Debug 中都有不同的应用和用途,可以根据具体情况选择使用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值