All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: "Randy.Dunlap" <rddunlap@osdl.org>, Dave Hansen <haveblue@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, akpm@zip.com.au, levon@movementarian.org
Subject: Re: [PATCH] documentation for basic guide to profiling
Date: Fri, 28 Feb 2003 13:45:08 -0800	[thread overview]
Message-ID: <364250000.1046468708@flay> (raw)
In-Reply-To: <20030228113041.0d0dd772.rddunlap@osdl.org>

OK, fixed a couple of things ... thanks for the feedback everyone.

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 13:44:11 2003
@@ -0,0 +1,44 @@
+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 ;-)    (mbligh@aracnet.com)
+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 System.map / vmlinux referenced!
+IMHO it's easier to use "make install" for linux and hack /sbin/installkernel
+to copy config files, system.map, vmlinux to /boot.
+
+Readprofile
+-----------
+get readprofile binary fixed for 2.5 / akpm's 2.5 patch from 
+ftp://ftp.kernel.org/pub/linux/people/mbligh/tools/readprofile/
+add "profile=2" to the kernel command line.
+
+clear		readprofile -r
+		<test>
+dump output	readprofile -m /boot/System.map > catured_profile
+
+Oprofile
+--------
+get source (I use 0.5) from http://oprofile.sourceforge.net/
+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
+


  reply	other threads:[~2003-02-28 21:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28  8:12 [PATCH] documentation for basic guide to profiling Martin J. Bligh
2003-02-28  8:29 ` Andrew Morton
2003-02-28 11:22   ` Dave Jones
2003-02-28 15:28     ` Jeff Garzik
2001-01-01  5:27       ` Anton Blanchard
2003-02-28 22:43         ` Martin J. Bligh
2003-02-28 23:05           ` Dave Hansen
2003-02-28 23:11         ` Martin J. Bligh
2003-03-01 17:51           ` Dave Jones
2003-03-01 20:48             ` John Levon
2003-03-02 23:05               ` Dave Jones
2003-03-01 20:55             ` Martin J. Bligh
2003-03-01 21:33               ` Dave Hansen
2003-03-03 21:57           ` Pavel Machek
2003-02-28 17:36 ` Randy.Dunlap
2003-02-28 18:11   ` Martin J. Bligh
2003-02-28 18:13     ` Dave Hansen
2003-02-28 19:30       ` Randy.Dunlap
2003-02-28 21:45         ` Martin J. Bligh [this message]
2003-02-28 21:49 ` Andries Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=364250000.1046468708@flay \
    --to=mbligh@aracnet.com \
    --cc=akpm@zip.com.au \
    --cc=haveblue@us.ibm.com \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.