From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 26 Nov 2009 14:28:22 +1100 From: Anton Blanchard To: Will Schmidt Subject: Re: hypervisor call tracepoints hcall_stats touchup. Message-ID: <20091126032822.GS32182@kryten> References: <1259165529.16349.191.camel@lexx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1259165529.16349.191.camel@lexx> Cc: linuxppc-dev , Frederic Weisbecker , mingo@redhat.com, Steven Rostedt List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > Signed-off-by: Will Schmidt Ouch! Nice catch. Acked-by: Anton Blanchard 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); > } >