lkml.org 
[lkml]   [2010]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ftrace: print sample std dev when function profiling
From
Date
On Mon, 2010-04-26 at 14:02 -0400, Chase Douglas wrote:

> + /* Sample standard deviation (s^2) */
> + if (rec->counter <= 1)
> + stddev = 0;
> + else {
> + stddev = rec->time_squared - rec->counter * avg * avg;
> + do_div(stddev, (rec->counter - 1) * 1000); /* ns^2 -> us^2 */

Shouldn't this be:

do_div(stddev, (rec->counter - 1) * 1000000); ?
(x / 1000)^2 == x^2 / 1000^2


-- Steve

> + }
> +




\
 
 \ /
  Last update: 2010-04-27 22:53    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean