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.
---
[ 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. ]
arch/powerpc/platforms/pseries/hvCall_inst.c +2 -2
@@ -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); }
Quoted 2 lines · Will Schmidt
Tested-by Will Schmidt <[email protected]>Signed-off-by Will Schmidt <[email protected]>
Isn't it assumed that the one that made the patch also tested it? Well I would hope that is the norm.
-- Steve
Quoted 7 lines · Steven Rostedt
Quoted 2 lines · Will Schmidt
Tested-by Will Schmidt <[email protected]>Signed-off-by Will Schmidt <[email protected]>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. :-)
Quoted 4 lines
-- Steve
Anton Blanchard
Acked-byHi Will,
Quoted 6 lines
The
tb_totalandpurr_totalvalues reported via thehcall_statscode should be cumulative, rather than being replaced by the latest delta tb or purr value.Tested-by Will Schmidt <[email protected]>Signed-off-by Will Schmidt <[email protected]>
Ouch! Nice catch.
Anton
Quoted 22 lines
[ 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. ]
arch/powerpc/platforms/pseries/hvCall_inst.c +2
-2@@ -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); }