linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <kravetz@us.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] powerpc: Instrument Hypervisor Calls
Date: Mon, 14 Aug 2006 19:32:24 -0700	[thread overview]
Message-ID: <20060815023224.GA3622@monkey.ibm.com> (raw)
In-Reply-To: <20060815110319.5f34417a.sfr@canb.auug.org.au>

On Tue, Aug 15, 2006 at 11:03:19AM +1000, Stephen Rothwell wrote:
> On Mon, 14 Aug 2006 16:21:44 -0700 Mike Kravetz <kravetz@us.ibm.com> wrote:
> > +#define HCALL_INST_POSTCALL					\
> > +	/* get time and PURR snapshots after hcall */		\
> > +	mftb	r7;			/* timebase after */	\
> > +BEGIN_FTR_SECTION;						\
> > +	mfspr	r8,SPRN_PURR;		/* PURR after */	\
> > +END_FTR_SECTION_IFSET(CPU_FTR_PURR);				\
> > +								\
> > +	/* calculate time and PURR deltas for call */		\
> > +	ld	r5,STK_PARM(r5)(r1);	/* timebase before */	\
> > +	subf	r5,r5,r7;					\
> > +	ld	r6,STK_PARM(r6)(r1);	/* PURR before */	\
> > +	subf	r6,r6,r8;					\
> 
> But here, if we have no PURR we produce random numbers.  Maybe you should
> reuse the TB value so the values reported may make some sense.

Good catch!

My intention was to detect the presence of PURR in the display (debugfs)
code.  If there is no PURR, then no PURR values are displayed.  My thought
is that it doesn't matter what values are in the field if we don't display
them.  

Unfortunately, I left that bit of code out of the patch.

How does that sound?  Suppose I can also put all the 'calculate PURR delta'
code in the FTR_SECTION to save a few cycles.
-- 
Mike

  reply	other threads:[~2006-08-15  2:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-14 23:21 [PATCH] powerpc: Instrument Hypervisor Calls Mike Kravetz
2006-08-14 23:35 ` Geoff Levand
2006-08-14 23:41   ` Mike Kravetz
2006-08-15  2:01     ` Geoff Levand
2006-08-15  2:34       ` Mike Kravetz
2006-08-15  1:03 ` Stephen Rothwell
2006-08-15  2:32   ` Mike Kravetz [this message]
2006-08-15  3:12     ` Stephen Rothwell
2006-08-15  3:32 ` Dave Boutcher
  -- strict thread matches above, loose matches on Subject: below --
2006-08-16 16:04 Mike Kravetz
2006-08-24  6:55 ` Paul Mackerras
2006-08-25 18:52   ` Mike Kravetz
2006-09-06 23:23 Mike Kravetz
2006-09-07  0:34 ` Paul Mackerras

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=20060815023224.GA3622@monkey.ibm.com \
    --to=kravetz@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).