Oprofile Help
=============
Install
=======
get source (I use 0.5) from http://oprofile.sourceforge.net/
add "idle=poll" to the kernel command line
Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
./configure --with-kernel-support
make install
 
Run
===
Specify what to capture:
opcontrol --vmlinux=/boot/vmlinux-2.6.1-patched-smp --pid-filter=
 
 
Start profiling:
opcontrol --start
OR
oprof_start <-- this will bring up a very nice gui
 
*** do work ***
 
Stop profiling:
opcontrol --shutdown
 
Gather info:
Whole system:
        opreport
On kernel:
        opreport -l /boot/vmlinux-2.6.1-patched-smp
Create annotated code
opannotate --source /boot/vmlinux-2.6.1-patched-smp
--base-dirs=/nfs/dhildebz/src/linux-2.6.1-patched-build
--search-dirs=/nfs/dhildebz/src/linux-2.6.1-patched-build
--output-dir=annotated
or
opannotate -a /boot/vmlinux-2.6.1-patched-smp > file
 
 
 
More help
=========
If you reinstall Oprofile over a previous version you need, before starting the profiler:
Or if you want to simply create a clean slate for profiling:
opcontrol --save=nfs4_ext3_write
opcontrol --reset
 
Delete old options from .oprofile in home directory
 
Force a dump:
opcontrol --dump
 
Top like behavior:
watch --interval=1 "opcontrol --dump && opreport -l 2>/dev/null | head -30 ;opcontrol --reset"
and for symbols:
watch --interval=1 "opcontrol --dump && opreport -l /boot/2.5.63/vmlinux |head -30 ; opcontrol --reset"