Re: [PATCH 3/3] ftrace: fix stddev calculation

2013-06-12 Thread Juri Lelli
On 06/12/2013 05:09 AM, Steven Rostedt wrote: On Tue, 2013-06-11 at 11:08 +0200, Juri Lelli wrote: When FUNCTION_GRAPH_TRACER is enabled, ftrace can profile kernel functions and print basic statistics about them. Unfortunately, running stddev calculation is wrong. This patch corrects it implemen

Re: [PATCH 3/3] ftrace: fix stddev calculation

2013-06-11 Thread Steven Rostedt
On Tue, 2013-06-11 at 11:08 +0200, Juri Lelli wrote: > When FUNCTION_GRAPH_TRACER is enabled, ftrace can profile kernel functions > and print basic statistics about them. Unfortunately, running stddev > calculation is wrong. This patch corrects it implementing Welford’s method: > > s^2 = 1

[PATCH 3/3] ftrace: fix stddev calculation

2013-06-11 Thread Juri Lelli
When FUNCTION_GRAPH_TRACER is enabled, ftrace can profile kernel functions and print basic statistics about them. Unfortunately, running stddev calculation is wrong. This patch corrects it implementing Welford’s method: s^2 = 1 / (n * (n-1)) * (n * \Sum (x_i)^2 - (\Sum x_i)^2) . Signed-of