powerpc/pseries: Hypervisor call tracepoints hcall_stats touchup
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Wed, 25 Nov 2009 06:12:09 +0000 (06:12 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 9 Feb 2010 02:55:05 +0000 (13:55 +1100)
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>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/hvCall_inst.c

index 2f58c71..1fefae7 100644 (file)
@@ -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);
 }