mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Umesh Tiwari <umesh.t@samsung.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	gupta.namit@samsung.com, pankaj.m@samsung.com,
	Himanshu Maithani <himanshu.m@samsung.com>
Subject: Re: [PATCH] ftrace: add tracing_thresh to function profile
Date: Mon, 13 Jul 2015 14:39:44 -0400	[thread overview]
Message-ID: <20150713143944.020ef25d@gandalf.local.home> (raw)
In-Reply-To: <1434972488-8571-1-git-send-email-umesh.t@samsung.com>

On Mon, 22 Jun 2015 16:58:08 +0530
Umesh Tiwari <umesh.t@samsung.com> wrote:

> From: Himanshu Maithani <himanshu.m@samsung.com>
> 
> This patch extends tracing_thresh functionality to function profile tracer.
> If tracing_thresh is set, print those entries only,
> whose average is > tracing thresh.
> 

This should also have a Signed-off-by from Himanshu Miathani. If
possible.

-- Steve

> Signed-off-by: Umesh Tiwari <umesh.t@samsung.com>
> ---
>  kernel/trace/ftrace.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 4f22802..7a48a67 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -600,13 +600,19 @@ static int function_stat_show(struct seq_file *m, void *v)
>  		goto out;
>  	}
>  
> +	/* moved above to avoid printing values < thresh */
> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> +	avg = rec->time;
> +	do_div(avg, rec->counter);
> +	if (tracing_thresh && (avg < tracing_thresh))
> +		goto out;
> +#endif
> +
>  	kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
>  	seq_printf(m, "  %-30.30s  %10lu", str, rec->counter);
>  
>  #ifdef CONFIG_FUNCTION_GRAPH_TRACER
>  	seq_puts(m, "    ");
> -	avg = rec->time;
> -	do_div(avg, rec->counter);
>  
>  	/* Sample standard deviation (s^2) */
>  	if (rec->counter <= 1)


  reply	other threads:[~2015-07-13 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 11:28 Umesh Tiwari
2015-07-13 18:39 ` Steven Rostedt [this message]
2015-07-16 21:45 ` Steven Rostedt

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=20150713143944.020ef25d@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=gupta.namit@samsung.com \
    --cc=himanshu.m@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pankaj.m@samsung.com \
    --cc=umesh.t@samsung.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®