Skip to content

ftrace: fix stddev calculation and add a test for it

Juri Lelli lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ftrace: refactor basis statistics calculation codekernel/trace/ftrace.c kernel/trace/trace.h+38 -240 replies
2/3ftrace: test basic statistics calculationkernel/trace/trace_selftest.c+72 -01 reply
3/3ftrace: fix stddev calculationkernel/trace/ftrace.c+6 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ftrace: fix stddev calculation and add a test for it

While profiling kernel functions via ftrace I noticed values of s^2 that seemed odd. I implemented a test to verify correctness of averages and s^2 calculations and proved the latter to be wrong. Then I fixed them up.

The first patch refactors function_stat_show() code a bit in order to be able to implement the test (second patch). Third patch fixes up s^2 calculation (applying Welford's method).

Juri Lelli (3):
ftrace: refactor basis statistics calculation code
ftrace: test basic statistics calculation
ftrace: fix stddev calculation

 kernel/trace/ftrace.c         |   50 ++++++++++++++--------------
 kernel/trace/trace.h          |   16 +++++++++
 kernel/trace/trace_selftest.c |   72 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 24 deletions(-)
Signature · 1 line
1.7.9.5