ia64/linux-2.6.18-xen.hg

diff Documentation/basic_profiling.txt @ 0:831230e53067

Import 2.6.18 from kernel.org tarball.
author Ian Campbell <ian.campbell@xensource.com>
date Wed Apr 11 14:15:44 2007 +0100 (2007-04-11)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Documentation/basic_profiling.txt	Wed Apr 11 14:15:44 2007 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +These instructions are deliberately very basic. If you want something clever,
     1.5 +go read the real docs ;-) Please don't add more stuff, but feel free to 
     1.6 +correct my mistakes ;-)    (mbligh@aracnet.com)
     1.7 +Thanks to John Levon, Dave Hansen, et al. for help writing this.
     1.8 +
     1.9 +<test> is the thing you're trying to measure.
    1.10 +Make sure you have the correct System.map / vmlinux referenced!
    1.11 +
    1.12 +It is probably easiest to use "make install" for linux and hack
    1.13 +/sbin/installkernel to copy vmlinux to /boot, in addition to vmlinuz,
    1.14 +config, System.map, which are usually installed by default.
    1.15 +
    1.16 +Readprofile
    1.17 +-----------
    1.18 +A recent readprofile command is needed for 2.6, such as found in util-linux
    1.19 +2.12a, which can be downloaded from:
    1.20 +
    1.21 +http://www.kernel.org/pub/linux/utils/util-linux/
    1.22 +
    1.23 +Most distributions will ship it already.
    1.24 +
    1.25 +Add "profile=2" to the kernel command line.
    1.26 +
    1.27 +clear		readprofile -r
    1.28 +		<test>
    1.29 +dump output	readprofile -m /boot/System.map > captured_profile
    1.30 +
    1.31 +Oprofile
    1.32 +--------
    1.33 +
    1.34 +Get the source (see Changes for required version) from
    1.35 +http://oprofile.sourceforge.net/ and add "idle=poll" to the kernel command
    1.36 +line.
    1.37 +
    1.38 +Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
    1.39 +
    1.40 +./configure --with-kernel-support
    1.41 +make install
    1.42 +
    1.43 +For superior results, be sure to enable the local APIC. If opreport sees
    1.44 +a 0Hz CPU, APIC was not on. Be aware that idle=poll may mean a performance
    1.45 +penalty.
    1.46 +
    1.47 +One time setup:
    1.48 +		opcontrol --setup --vmlinux=/boot/vmlinux
    1.49 +
    1.50 +clear		opcontrol --reset
    1.51 +start		opcontrol --start
    1.52 +		<test>
    1.53 +stop		opcontrol --stop
    1.54 +dump output	opreport >  output_file
    1.55 +
    1.56 +To only report on the kernel, run opreport -l /boot/vmlinux > output_file
    1.57 +
    1.58 +A reset is needed to clear old statistics, which survive a reboot.
    1.59 +