[lkml]   [2003]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] documentation for basic guide to profiling
OK, fixed a couple more things (spelling, and pointer to new tools).
I don't really want to add a list of 200 arches, but I'll do a script
with any info people email me the cpuinfo output and correct oprofile
setting for ... I'll do that for the existing ones instead of what's
there now as well.

diff -purN -X /home/mbligh/.diff.exclude virgin/Documentation/basic_profiling.txt prof_docs/Documentation/basic_profiling.txt
--- virgin/Documentation/basic_profiling.txt Wed Dec 31 16:00:00 1969
+++ prof_docs/Documentation/basic_profiling.txt Fri Feb 28 15:04:17 2003
@@ -0,0 +1,48 @@
+These instructions are deliberately very basic. If you want something clever,
+go read the real docs ;-) Please don't add more stuff, but feel free to
+correct my mistakes ;-) (
+Thanks to John Levon and Dave Hansen for help writing this.
+<test> is the thing you're trying to measure.
+Make sure you have the correct / vmlinux referenced!
+IMHO it's easier to use "make install" for linux and hack /sbin/installkernel
+to copy config files,, vmlinux to /boot.
+You need a fixed readprofile command for 2.5 ... either get hold of
+a current version from:
+or get readprofile binary fixed for 2.5 / akpm's 2.5 patch from
+Add "profile=2" to the kernel command line.
+clear readprofile -r
+ <test>
+dump output readprofile -m /boot/ > captured_profile
+get source (I use 0.5) from
+add "poll=idle" to the kernel command line
+Configure with CONFIG_PROFILING=y and CONFIG_OPROFILE=y & reboot on new kernel
+./configure --with-kernel-support
+make install
+One time setup (pick appropriate one for your CPU):
+P3 opcontrol --setup --vmlinux=/boot/vmlinux \
+ --ctr0-event=CPU_CLK_UNHALTED --ctr0-count=100000
+Athlon/x86-64 opcontrol --setup --vmlinux=/boot/vmlinux \
+ --ctr0-event=RETIRED_INSNS --ctr0-count=100000
+P4 opcontrol --setup --vmlinux=/boot/vmlinux \
+ --ctr0-event=GLOBAL_POWER_EVENTS \
+ --ctr0-unit-mask=1 --ctr0-count=100000
+start daemon opcontrol --start-daemon
+clear opcontrol --reset
+start opcontrol --start
+ <test>
+stop opcontrol --stop
+dump output oprofpp -dl -i /boot/vmlinux > output_file
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.058 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site