mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Chase Douglas <chase.douglas@canonical.com>
Cc: linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] ftrace: print sample std dev when function profiling
Date: Tue, 27 Apr 2010 16:50:02 -0400	[thread overview]
Message-ID: <1272401402.9739.77.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1272304925-2436-1-git-send-email-chase.douglas@canonical.com>

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

> +	}
> +



  reply	other threads:[~2010-04-27 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 18:02 Chase Douglas
2010-04-27 20:50 ` Steven Rostedt [this message]
2010-04-27 21:06   ` Chase Douglas
2010-04-27 22:15     ` Steven Rostedt
2010-04-30  8:47 ` [tip:tracing/core] tracing: Show sample std dev in " tip-bot for Chase Douglas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272401402.9739.77.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=chase.douglas@canonical.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®