[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] kernel profiler
On Fri, Dec 17, 1999 at 01:03:23PM +0530, Sharad Joshi wrote:
> +
> + There is some primitive profiling support in the official kernel.
> + Grep for x86_do_profile. You enable it with a LILO argument and
> + get the profile data from /proc.
> +
>
> That argument is profile=2 or something i suppose, no? Thats how the
> program i have works. It reads from /proc/profile. But i dunno how the
> /proc/profile is arranged. Any info on that?
The command is readprofile. It reads /proc/profile and prints the data
in a readable manner.
If you pass profile=n, x86_do_profile stores (increments the count)
the current IP at each timer interrupt in one of the
(kernel code size >> n) buckets. So you get a "rough" i.e. (1 << n)
approximation of where time is getting spent in the kernel.
When you read /proc/profile, it basically returns the contents of the
buckets.
-Arun
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.