All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Mike Kravetz <kravetz@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Collecting hypervisor call stats
Date: Wed, 31 May 2006 14:25:42 -0700	[thread overview]
Message-ID: <447E09D6.2090402@am.sony.com> (raw)
In-Reply-To: <20060531204144.GA7909@w-mikek2.ibm.com>

Mike Kravetz wrote:
> We would like to add code that gathers statistics about hypervisor calls.
> It would keep track of things like # of calls made for each opcode as well
> as time spent processing the calls.
> 
> The 'obvious' place to gather such statistics would be from within the
> routines making hcalls in hvCall.S.  Once thing that I have noticed is
> the following comment at the beginning hvCall.S:
> 
>  * NOTE: this file will go away when we move to inline this work.
> 
> So, it appears someone thought/thinks these routines should be inlined.  
> I assume this is for performance reasons?  If this is the case, then I
> suspect gathering of statistics (which would introduce overhead) would
> meet resistance?
> 
> Comments about the feasibility of adding such statistic gathering code
> would be appreciated.


FYI, there exists an add-on feature KFT (kernel function trace)
which you may be able to extend to do much of what you want.  It
uses gcc's -finstrument-functions option to hook into the
entry and exit of C functions.  You may able to add the hooks
by hand to the asm routines in hvCall.S and then take advantage
of the existing KFT functionality to start and stop traces, post
process the data, etc.

http://tree.celinuxforum.org/CelfPubWiki/KernelFunctionTrace

-Geoff

  reply	other threads:[~2006-05-31 21:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-31 20:41 Collecting hypervisor call stats Mike Kravetz
2006-05-31 21:25 ` Geoff Levand [this message]
2006-05-31 22:40 ` Paul Mackerras
2006-05-31 22:58   ` Mike Kravetz
2006-06-01  5:26     ` Benjamin Herrenschmidt
2006-06-01 18:14       ` Arnd Bergmann
2006-06-01 21:57         ` Benjamin Herrenschmidt
2006-06-01  4:34 ` Jimi Xenidis
2006-06-01  5:12   ` Christopher Yeoh
2006-06-06 16:46     ` Mike Kravetz
2006-06-07  1:08       ` Christopher Yeoh
2006-06-07 22:57       ` Segher Boessenkool

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=447E09D6.2090402@am.sony.com \
    --to=geoffrey.levand@am.sony.com \
    --cc=kravetz@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.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.