oProfile 学习

oProfile工具可以分析CPU的负载量

只要对目标程序加上 -g 后重新编译,即可用oProfile进行分析

例如在测试apache的性能时,

增加 -g 编译选项
[crifan@localhost lrzsz-0.12.20]$ CFLAGS=-g ./configure

问题:
opcontrol --start失败
解决办法
[root@mysqlmaster03 boot]# opcontrol –deinit
[root@mysqlmaster03 boot]# echo 0 > /proc/sys/kernel/watchdog
[root@mysqlmaster03 boot]# opcontrol –init

原文地址:https://www.cnblogs.com/maxpak/p/4502840.html