linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* hypervisor call tracepoints  hcall_stats touchup.
@ 2009-11-25 16:12 Will Schmidt
  2009-11-25 21:19 ` Steven Rostedt
  2009-11-26  3:28 ` Anton Blanchard
  0 siblings, 2 replies; 4+ messages in thread
From: Will Schmidt @ 2009-11-25 16:12 UTC (permalink / raw)
  To: Anton Blanchard, Steven Rostedt, Frederic Weisbecker, mingo,
	Benjamin Herrenschmidt
  Cc: linuxppc-dev, will_schmidt


The tb_total and purr_total values reported via the hcall_stats code
should be cumulative, rather than being replaced by the latest delta tb
or purr value. 

Tested-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>

---
[ This is a touch-up to the "[3/6] powerpc: tracing: Add hypervisor call
tracepoints" patch submitted by Anton a few weeks back, so I've copied
folks Anton had on CC for his original patch, this fix is rather ppc
specific, so can probably go in via the ppc tree, but I've no real
preference. ]

diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index 2f58c71..1fefae7 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -124,8 +124,8 @@ static void probe_hcall_exit(unsigned long opcode, unsigned long retval,
 
 	h = &__get_cpu_var(hcall_stats)[opcode / 4];
 	h->num_calls++;
-	h->tb_total = mftb() - h->tb_start;
-	h->purr_total = mfspr(SPRN_PURR) - h->purr_start;
+	h->tb_total += mftb() - h->tb_start;
+	h->purr_total += mfspr(SPRN_PURR) - h->purr_start;
 
 	put_cpu_var(hcall_stats);
 }

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

* Re: hypervisor call tracepoints  hcall_stats touchup.
  2009-11-25 16:12 hypervisor call tracepoints hcall_stats touchup Will Schmidt
@ 2009-11-25 21:19 ` Steven Rostedt
  2009-11-30 15:17   ` Will Schmidt
  2009-11-26  3:28 ` Anton Blanchard
  1 sibling, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2009-11-25 21:19 UTC (permalink / raw)
  To: will_schmidt; +Cc: linuxppc-dev, Frederic Weisbecker, mingo, Anton Blanchard

On Wed, 2009-11-25 at 10:12 -0600, Will Schmidt wrote:

> Tested-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>

Isn't it assumed that the one that made the patch also tested it? Well I
would hope that is the norm.

-- Steve

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

* Re: hypervisor call tracepoints  hcall_stats touchup.
  2009-11-25 16:12 hypervisor call tracepoints hcall_stats touchup Will Schmidt
  2009-11-25 21:19 ` Steven Rostedt
@ 2009-11-26  3:28 ` Anton Blanchard
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Blanchard @ 2009-11-26  3:28 UTC (permalink / raw)
  To: Will Schmidt; +Cc: linuxppc-dev, Frederic Weisbecker, mingo, Steven Rostedt


Hi Will,

> The tb_total and purr_total values reported via the hcall_stats code
> should be cumulative, rather than being replaced by the latest delta tb
> or purr value. 
> 
> Tested-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>

Ouch! Nice catch.

Acked-by: Anton Blanchard <anton@samba.org>

Anton

> [ This is a touch-up to the "[3/6] powerpc: tracing: Add hypervisor call
> tracepoints" patch submitted by Anton a few weeks back, so I've copied
> folks Anton had on CC for his original patch, this fix is rather ppc
> specific, so can probably go in via the ppc tree, but I've no real
> preference. ]
> 
> diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
> index 2f58c71..1fefae7 100644
> --- a/arch/powerpc/platforms/pseries/hvCall_inst.c
> +++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
> @@ -124,8 +124,8 @@ static void probe_hcall_exit(unsigned long opcode, unsigned long retval,
>  
>  	h = &__get_cpu_var(hcall_stats)[opcode / 4];
>  	h->num_calls++;
> -	h->tb_total = mftb() - h->tb_start;
> -	h->purr_total = mfspr(SPRN_PURR) - h->purr_start;
> +	h->tb_total += mftb() - h->tb_start;
> +	h->purr_total += mfspr(SPRN_PURR) - h->purr_start;
>  
>  	put_cpu_var(hcall_stats);
>  }
> 

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

* Re: hypervisor call tracepoints  hcall_stats touchup.
  2009-11-25 21:19 ` Steven Rostedt
@ 2009-11-30 15:17   ` Will Schmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Will Schmidt @ 2009-11-30 15:17 UTC (permalink / raw)
  To: rostedt; +Cc: linuxppc-dev, Frederic Weisbecker, mingo, Anton Blanchard

On Wed, 2009-11-25 at 16:19 -0500, Steven Rostedt wrote:
> On Wed, 2009-11-25 at 10:12 -0600, Will Schmidt wrote:
> 
> > Tested-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> > Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
> 
> Isn't it assumed that the one that made the patch also tested it? Well I
> would hope that is the norm.

I like to make that assumption, but wanted to be clear on the point for
anyone with doubts. :-)


> 
> -- Steve
> 
> 

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

end of thread, other threads:[~2009-11-30 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 16:12 hypervisor call tracepoints hcall_stats touchup Will Schmidt
2009-11-25 21:19 ` Steven Rostedt
2009-11-30 15:17   ` Will Schmidt
2009-11-26  3:28 ` Anton Blanchard

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).