OProfile is a Profiling tool which is particularly useful for looking at all programs on a Linux system including the LinuxKernel if you are doing KernelDevelopment.
The home page for this project is at http://oprofile.sourceforge.net/
Steps to use OProfile: (To be completed as IanMcDonald documents and gets it working)
- Install OProfile
- Build LinuxKernel with profiling support (Under Instrumentation Support for kernel when building)
- Install kernel including vmlinux (not just vmlinuz). See script on KernelDevelopment
- Reset stats if needed with sudo opcontrol --reset (Stats get carried over after reboots)
- Start with sudo opcontrol --start --vmlinux=/boot/vmlinux-myname (where myname is whatever you've called vmlinux)
- Run your task
- Stop with sudo opcontrol --stop
- Use opreport command to run reports (see man page for details)