Browse Source

powerpc/pseries: Hypervisor call tracepoints hcall_stats touchup

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>
Will Schmidt 15 years ago
parent
commit
25ef231de2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      arch/powerpc/platforms/pseries/hvCall_inst.c

+ 2 - 2
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);
 }