Showing posts with label profiling. Show all posts
Showing posts with label profiling. Show all posts

Friday, June 27, 2008

Oprofile setup on ubuntu

Installing oprofile on ubuntu goes like this
sudo apt-get install linux-kernel-devel fakeroot build-essential
sudo apt-get source linux-image-`uname -r`
sudo apt-get build-dep linux-image-`uname -r`
cd linux-source-`uname -r`
sudo make oldconfig
sudo make vmlinux
sudo apt-get install oprofile
sudo opcontrol --setup --vmlinux=`pwd`/vmlinux
sudo opcontrol --start

and then you should see something like this
Using 2.6+ OProfile kernel interface.
Reading module info.
Using log file /var/lib/oprofile/oprofiled.log
Daemon started.
Profiler running.

If you see some error's check if you sh is pointing to bash.
cd /bin
sudo rm sh
sudo ln -s -T bash sh