]> git.baikalelectronics.ru Git - kernel.git/commit
tools/tracing/rtla: osnoise_hist: use total duration for average calculation
authorAndreas Ziegler <br015@umbiko.net>
Tue, 3 Jan 2023 10:33:59 +0000 (11:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:26 +0000 (09:33 +0100)
commitdb3daf83062257cd0ef8a6623ecc9870ee928704
treedc894925d6b8c4ae247be10eb22bbe43717603f9
parentebf5797b41f9528fb2f19d6082f08083826f9750
tools/tracing/rtla: osnoise_hist: use total duration for average calculation

[ Upstream commit 3c5e0981d20ffb42d1ad4505a69ade8f492004cd ]

Sampled durations must be weighted by observed quantity, to arrive at a correct
average duration value.

Perform calculation of total duration by summing (duration * count).

Link: https://lkml.kernel.org/r/20230103103400.275566-2-br015@umbiko.net
Fixes: 68cee15f86dc ("rtla/osnoise: Add the hist mode")
Signed-off-by: Andreas Ziegler <br015@umbiko.net>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/tracing/rtla/src/osnoise_hist.c