lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Apr 2010 16:50:02 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Chase Douglas <chase.douglas@...onical.com>
Cc:	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] ftrace: print sample std dev when function profiling

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

> +	}
> +


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ