Skip to main content.
Navigation:
DENX
>
Training2
>
LddProfiling
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
Training2
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
Training2 Home
Changes
Index
Search
Go
List of pages in Training2
Search
%SECTION0{name=LddProfiling}% Profiling techniques * Profiling is a technique for discouvering performance bottlenecks * For Linux two techniques available: 1) full coverage analysis with gcov [[http://lwn.net/Articles/284886/][LWN article]] * not included in mainline * kernel only 2) statistical profiling with OProfile[2] * included in mainline and ELDK contains userspace support * works out of the box for kernel and userspace * OProfile * Enable in Kernel: * General Setup -> Profiling Support (Experimental) * Kernel Hacking -> Compile Kernel with Debug Info *simple session (multiply example taken from [1])* <verbatim> # initalize oprof $ opcontrol --init # where's our kernel? $ opcontrol --vmlinux=/tmp/vmlinux # clear old data $ opcontrol --reset # available events? $ opcontrol -l # start daemon and start collecting data $ opcontrol --start # run application $ while ./multiply; do ./multiply; echo -n .; done ......... # dump data to daemon $ opcontrol --dump # stop daemon $ opcontrol --stop # examine $ opcontrol -l ./multiply # annotate $ opannotate -s ./multiply </verbatim> * Further reading * [1] [[http://www.ibm.com/developerworks/systems/library/es-oprofile/][Profiling on Power]] * [2] [[http://oprofile.sourceforge.net/news/][OProfile Project]]
5.4.3. Debugging with Hardware Debuggers
1. Denx Training Topics
5.5. The Linux driver model
Prev
Home
Next