Skip to content

Commit

Permalink
powerpc/pseries: Hypervisor call tracepoints hcall_stats touchup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Will Schmidt authored and Benjamin Herrenschmidt committed Feb 9, 2010
1 parent efec959 commit 25ef231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/pseries/hvCall_inst.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 25ef231

Please sign in to comment.