被折腾惨了,留个纪念.
方法: git 最新的Linus tree,tip tree也弄了 ,
然后在tools/perf下面install,提示几个包没有装,安装后
超级用户(一开始普通用户出错只是提醒我没有文件,但包已经安装了,后面才反应过来)
make -j install
出错
builtin-top.c:518:9: 错误:此函数中的‘counter’在使用前可能未初始化很可能是一个bug,跑进去将counter初始化为0.
然后就成功了,奇怪的是普通用户键入perf还是老版本的,要使用绝对路径才行
[root@localhost perf]# make -j install
PERF_VERSION = 2.6.38.2972.gf88210.dirty
GEN perf-archive
CC perf.o
CC builtin-top.o
AR libperf.a
LINK perf
install -d -m 755 '/root/bin'
install perf '/root/bin'
install -d -m 755 '/root/libexec/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'
install -d -m 755 '/root/libexec/perf-core/scripts/perl/bin'
install perf-archive -t '/root/libexec/perf-core'
install scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '/root/libexec/perf-core/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'
install scripts/perl/*.pl -t '/root/libexec/perf-core/scripts/perl'
install scripts/perl/bin/* -t '/root/libexec/perf-core/scripts/perl/bin'
install -d -m 755 '/root/libexec/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace'
install -d -m 755 '/root/libexec/perf-core/scripts/python/bin'
install scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '/root/libexec/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace'
install scripts/python/*.py -t '/root/libexec/perf-core/scripts/python'
install scripts/python/bin/* -t '/root/libexec/perf-core/scripts/python/bin'
[root@localhost perf]# trace
命令未找到。
[root@localhost perf]# ls /root/bin/perf -l
-rwxr-xr-x. 1 root root 16195141 3月 26 23:09 /root/bin/perf
[root@localhost perf]# /root/bin/perf --version
perf version 2.6.38.2972.gf88210.dirty
[root@localhost perf]# /root/bin/perf
usage: perf [--version] [--help] COMMAND [ARGS]
The most commonly used perf commands are:
annotate Read perf.data (created by perf record) and display annotated code
archive Create archive with object files with build-ids found in perf.data file
bench General framework for benchmark suites
buildid-cache Manage build-id cache.
buildid-list List the buildids in a perf.data file
diff Read two perf.data files and display the differential profile
evlist List the event names in a perf.data file
inject Filter to augment the events stream with additional information
kmem Tool to trace/measure kernel memory(slab) properties
kvm Tool to trace/measure kvm guest os
list List all symbolic event types
lock Analyze lock events
probe Define new dynamic tracepoints
record Run a command and record its profile into perf.data
report Read perf.data (created by perf record) and display the profile
sched Tool to trace/measure scheduler properties (latencies)
script Read perf.data (created by perf record) and display trace output
stat Run a command and gather performance counter statistics
test Runs sanity tests.
timechart Tool to visualize total system behavior during a workload
top System profiling tool.
See 'perf help COMMAND' for more information on a specific command.
阅读(2200) | 评论(0) | 转发(0) |