Oprofile: Difference between revisions

From YobiWiki
Jump to navigation Jump to search
Content deleted Content added
mNo edit summary
 
m Reverted edits by Etegohy (Talk) to last revision by PhilippeTeuwen
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
<br>If you want to profile also the kernel you need the uncompressed version of the kernel.
<br>If you want to profile also the kernel you need the uncompressed version of the kernel.
<br>Unfortunately under Debian this is not possible just like that, what you can do is recompiling the kernel with "make vmlinux", cf [http://bonglonglong.com/2006/12/06/oprofile-kernel-images-and-innodb-oh-my/ this post]
<br>Unfortunately under Debian this is not possible just like that, what you can do is recompiling the kernel with "make vmlinux", cf [http://bonglonglong.com/2006/12/06/oprofile-kernel-images-and-innodb-oh-my/ this post]

To load and prepare the driver interface
opcontrol --init

To unload the driver interface
opcontrol --deinit

To clean the oprofile dumps of current session
opcontrol --reset

To point to the kernel in uncompressed format
opcontrol --vmlinux=/boot/vmlinux-`uname -r`

Or if there is no uncompressed kernel
opcontrol --no-vmlinux

To start the daemon and profiling
opcontrol --start

To stop profiling and kill the daemon
opcontrol --shutdown

To check status
opcontrol --status

To flush collected data
opcontrol --dump

To save data of current session
opcontrol --save=''sessionname''

Starting the profiling and tune its setup can be done with the gui
oprof_start


opcontrol --no-vmlinux --event=default
opreport --merge tgid
opreport --symbols --merge tgid
opreport -l --merge all -t 20 -% /usr/lib/iceweasel/firefox-bin

Latest revision as of 20:38, 24 November 2010

From oprofile.sourceforge.net

apt-get install oprofile oprofile-gui prospect

Then you can read file:///usr/share/doc/oprofile/oprofile.html
If you want to profile also the kernel you need the uncompressed version of the kernel.
Unfortunately under Debian this is not possible just like that, what you can do is recompiling the kernel with "make vmlinux", cf this post

To load and prepare the driver interface

opcontrol --init

To unload the driver interface

opcontrol --deinit

To clean the oprofile dumps of current session

opcontrol --reset

To point to the kernel in uncompressed format

opcontrol --vmlinux=/boot/vmlinux-`uname -r`

Or if there is no uncompressed kernel

opcontrol --no-vmlinux

To start the daemon and profiling

opcontrol --start

To stop profiling and kill the daemon

opcontrol --shutdown

To check status

opcontrol --status

To flush collected data

opcontrol --dump

To save data of current session

opcontrol --save=sessionname

Starting the profiling and tune its setup can be done with the gui

oprof_start 


opcontrol --no-vmlinux --event=default
opreport --merge tgid
opreport --symbols --merge tgid
opreport -l --merge all -t 20 -% /usr/lib/iceweasel/firefox-bin