Re: Question:kernel profiling and readprofile

Randy.Dunlap (rddunlap@osdl.org)
Thu, 23 May 2002 08:24:29 -0700 (PDT)


On Thu, 23 May 2002, Padraig Brady wrote:

| will fitzgerald wrote:
| > hi all,
| >
| > i stumbled accross a command called readprofile by accident and found
| > that by appening the line append="profile=2" to the lilo.conf file
| > and using thread profile command you can get statistics on functions
| > that spend a certain amount of time doing a job.
| >
| > i done some searching on this and can't find anything other than a
| > man page on readprofile.
| >
| > can anyone tell me what does the line append="profile=2" actually do
| > apart from creating the file profile in the proc directory, what is
| > the 2 for in this line?
|
| The level. see linux/Documentation/kernel-parameters.txt
| Also worth looking at is http://oss.sgi.com/projects/kernprof/

or what readprofile calls the 'step' size, but the kernel parameter
is actually a shift value (1 << prof_shift), so it is the power-of-2
bucket size for each profiled bucket (all resident kernel code).
profile=2 means step (or bucket size) = 2^2 = 4 bytes per
profile counter. Fairly fine-grained so it can pinpoint
code/functions fairly well.
profile=4 means step size of 2^4 = 16 bytes. Uses less profile
buffer memory in the kernel.

| Also I don't think you can profile modules, but there was a patch...
| http://marc.theaimsgroup.com/?l=linux-kernel&m=101663078100596&w=2

Thanks for that link. I'm interested in that.

-- 
~Randy

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/