mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [announce] 'kerneltop'
@ 2002-05-23 18:13 Randy.Dunlap
  2002-05-23 18:27 ` John Levon
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2002-05-23 18:13 UTC (permalink / raw)
  To: linux-kernel


Here is kerneltop version 0.5.

usage:  must be <root> to run it since it clears
/proc/profile every <N> seconds.

./kerneltop: usage: "./kerneltop [options]
  -m <mapfile>  (default = "/boot/System.map")
  -p <pro-file> (default = "/proc/profile")
  -l <lines>    set number of lines to print (def. = 20; max = 100)
  -s <seconds>  set sleep time in seconds (def. = 1)
  -t <ticks>    set threshold of number of ticks to print (def. = 1)
                  a function must have this many ticks to be printed
  -u print unsorted (skip the sort)
  -V print version and exit

Just unpack the tarball and run 'make' to build it.
It lives at <http://www.xenotime.net/linux/kerneltop/>.

Boot with "profile=N" (kernel command line option) to that
/proc/profile is created (e.g., profile=4).

Caveat emptor:
Using in-kernel profiling has a small side-effect.
Adding 'kerneltop' adds another side-effect to memory usage,
processor scheduling, cache usage, etc.

Does not profile modules.
Does not know window size; use -l to tell it if you want to print
more than 20 lines.

'kerneltop' is based on 'readprofile' with large changes.

BTW, does anyone know of another such program that
already exists (and that I missed somehow in my web search)?

Comments, feedback?

Thanks,
~Randy


Example with -s 5 (5-second intervals) and profile=4:
In this interval of 500 ticks (x86), 109 ticks were in the kernel
and the rest were in userspace ('make dep').


bin/kerneltop Version 0.5
Linux dragon.pdx.osdl.net 2.4.18 #1 Wed Apr 23 12:56:42 PST 2002 i686 unknown
Sampling_step: 16 | Address range: 0xc0105000 - 0xc020fbd2
----------------------------------------------------------------------
address  function    time:  2002-05-23/11:06:26    ticks
c0105380 default_idle                                 57
c012e8a0 si_swapinfo                                   8
c0111980 do_page_fault                                 5
c01254e0 file_read_actor                               5
c01225b0 do_anonymous_page                             4
c01228c0 pte_alloc                                     2
c0143b30 d_lookup                                      2
c020a4f0 __generic_copy_to_user                        2
c020a670 strnlen_user                                  2
c0106e90 system_call                                   1
c010b930 old_mmap                                      1
c0121160 zap_page_range                                1
c0121eb0 do_wp_page                                    1
c0122680 do_no_page                                    1
c0122a20 vm_enough_memory                              1
c0123c80 __insert_vm_struct                            1
c0125000 do_generic_file_read                          1
c0129af0 kmem_cache_alloc                              1
c0129b50 kmalloc                                       1
c012c380 __free_pages_ok                               1
00000000 total                                       109


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [announce] 'kerneltop'
  2002-05-23 18:13 [announce] 'kerneltop' Randy.Dunlap
@ 2002-05-23 18:27 ` John Levon
  0 siblings, 0 replies; 2+ messages in thread
From: John Levon @ 2002-05-23 18:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: rddunlap

On Thu, May 23, 2002 at 11:13:22AM -0700, Randy.Dunlap wrote:

> BTW, does anyone know of another such program that
> already exists (and that I missed somehow in my web search)?

Depends on your definition of "such program". For one, there is :

http://sourceforge.net/projects/minilop/

There is at least one other (older I think) version of readprofile.c
going about as well as my slightly modified version too...

There is also a version that avoids a reboot via a module hack (see
freshmeat), and the previously mentioned module-profiling readprofile
version.

Also see these (incomplete) parts of my howto :

http://movementarian.org/kernelprofilers.html
http://movementarian.org/bibliography.html

regards
john

-- 
"This is playing, not work, therefore it's not a waste of time."
	- Zath

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-23 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-23 18:13 [announce] 'kerneltop' Randy.Dunlap
2002-05-23 18:27 ` John Levon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®