mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dimitris Michailidis <dimitris@darkside.engr.sgi.com>
To: Robert Walsh <rjwalsh@durables.org>
Cc: linux-kernel@vger.rutgers.edu
Subject: Re: kernel profiling
Date: 09 Jul 1999 13:43:40 -0700	[thread overview]
Message-ID: <6yrwvw9y2o3.fsf@darkside.engr.sgi.com> (raw)
In-Reply-To: Robert Walsh's message of "8 Jul 1999 21:26:48 -0700"

Robert Walsh <rjwalsh@durables.org> writes:

> Other than /dev/profile, is there any mechanism available for
> profiling the kernel?  For example, has anyone implemented a
> __mcount() function to handle a kernel compiled with -pg, or is this
> even possible?
> 
> We're currently profiling the kernel NFS daemon (the entire path from
> network to disk) using SPECsfs and other benchmarking mechanisms, and
> before I start working on a home-grown profiling mechanism I'd like to
> make sure I'm not reinventing the wheel.
> 
> BTW: /proc/profile hasn't got enough granularity for our purposes and
> doesn't provide info such as call-graph statistics.

Back in May I posted a patch to enable kernel profiling using gprof, which
should give you the call graph statistics you want.  The patch basically
implements mcount() to collect statistics, adds a couple of files to /proc to 
make the statistics available to the user land, and provides a command,
kernprof, to generate gmon.out for consumption by gprof.  kernprof, in
addition to preparing data for gprof, also does the job of readprofile, with
a number of bugs of the latter fixed.

You can get the patch from

http://linuxwww.db.erau.edu/mail_archives/linux-kernel/May_99/2383.html

or other archives.  Since there has been no response to this patch there has
been no further development since the initial release, but it probably still
applies cleanly against the 2.2.x kernels.

As noted in the initial post, due to bugs in gcc/egcs that cause
miscompilation of programs that use -pg and regparms, to use this patch you
either need a hacked version of egcs or you need to disable the FASTCALLs in
the kernel (the latter is done in the IKD patch).

Let me know if you have any suggestions to improve the patch or need other
assistance.

-- 
Dimitris Michailidis                    dimitris@engr.sgi.com

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

       reply	other threads:[~1999-07-09 20:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7m3tm8$7lvnt@fido.engr.sgi.com>
1999-07-09 20:43 ` Dimitris Michailidis [this message]
1999-07-26 19:59 Karim Yaghmour
2002-03-12 19:29 Kernel profiling Steffen Persvold
2002-03-12 21:11 ` John Levon
     [not found] <3C8E5712.20E5E317@scali.com.suse.lists.linux.kernel>
2002-03-12 21:17 ` Andi Kleen
2003-01-22  0:34 kernel profiling Hui_Ning
2003-01-22 17:07 ` Hanna Linder
2003-02-05 10:56 Yours Lovingly
2003-02-06 16:22 Yours Lovingly
2003-04-08  7:58 KERNEL PROFILING shesha bhushan
2003-04-08 15:01 ` Randy.Dunlap
2003-04-08 19:42 shesha bhushan
2003-04-08 20:03 ` Randy.Dunlap
2003-04-08 20:53   ` Andy Pfiffer

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=6yrwvw9y2o3.fsf@darkside.engr.sgi.com \
    --to=dimitris@darkside.engr.sgi.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=rjwalsh@durables.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome