环境centos 6.4
oprofile
1) yum 安装oprofile
2) 具体步骤见 http://blog.chinaunix.net/uid-13746440-id-3152484.html。 但是无vmlinux。
opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog
opcontrol --init
opcontrol --reset
opcontrol --start --no-vmlinux
。。。。
结果不成功。
或者从这能得到opcontrol更具体的信息 http://blog.csdn.net/bobpen/article/details/18444885
3)怎么得到vmlinux?
按如下方式得到的vmlinux 不可使用。(从vmlinuz转vmlinux不可用)
opcontrol --start --no-vmlinux 报错 :
"
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf.
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Error: counter 0 not available nmi_watchdog using this resource ? Try:
opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog
"
solution:
opcontrol --deinit
echo 0 > /proc/sys/kernel/watchdog
opcontrol --init
gperf
1)安装
2) -llib
3)CPUPFOFILE=./test.prof ./test
4)pprof --text ./test ./test.prof #见README说明
http://blog.csdn.net/panda_bear/article/details/8057646
gprof
.....
http://blog.chinaunix.net/uid-13746440-id-3152484.html