码迷,mamicode.com
首页 > 其他好文 > 详细

在Ubuntu custom kernel上裝perf by compile

时间:2014-05-16 04:06:37      阅读:386      评论:0      收藏:0      [点我收藏+]

标签:blog   class   c   tar   http   int   

Using perf, the Linux Performance Analysis tool on Ubuntu Karmic

A lot has been going on with Linux performance counters (now called performance events), but there is enough functionality in the 2.6.31 kernel that ships with Ubuntu karmic to be able to use some of the features available in perf. I recently found it useful when debugging a performance issue on my mythtv frontend.

To build perf, first install the dependencies:

sudo apt-get install libelf-dev binutils-dev

Then grab a recent kernel source tree and build perf:

wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.33-rc3.tar.bz2
tar xjf linux-2.6.33-rc3.tar.bz2
cd linux-2.6.33-rc3/tools/perf
make
make install

It will warn that libdwarf-dev is not installed, but the version in karmic is too old and regardless libdwarf is only required for event tracing that appeared in more recent kernels. perf installs into ~/bin/perf. You should then be able to use the top, stat, list, record, report and annotate options.

This entry was posted in Uncategorized on January 10, 2010.

在Ubuntu custom kernel上裝perf by compile,布布扣,bubuko.com

在Ubuntu custom kernel上裝perf by compile

标签:blog   class   c   tar   http   int   

原文地址:http://www.cnblogs.com/bittorrent/p/3729502.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!