* [PATCH] ftrace: add tracing_thresh to function profile
@ 2015-06-22 11:28 Umesh Tiwari
2015-07-13 18:39 ` Steven Rostedt
2015-07-16 21:45 ` Steven Rostedt
0 siblings, 2 replies; 3+ messages in thread
From: Umesh Tiwari @ 2015-06-22 11:28 UTC (permalink / raw)
To: rostedt, mingo, linux-kernel
Cc: gupta.namit, pankaj.m, Himanshu Maithani, Umesh Tiwari
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.
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)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: add tracing_thresh to function profile
2015-06-22 11:28 [PATCH] ftrace: add tracing_thresh to function profile Umesh Tiwari
@ 2015-07-13 18:39 ` Steven Rostedt
2015-07-16 21:45 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2015-07-13 18:39 UTC (permalink / raw)
To: Umesh Tiwari
Cc: mingo, linux-kernel, gupta.namit, pankaj.m, Himanshu Maithani
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ftrace: add tracing_thresh to function profile
2015-06-22 11:28 [PATCH] ftrace: add tracing_thresh to function profile Umesh Tiwari
2015-07-13 18:39 ` Steven Rostedt
@ 2015-07-16 21:45 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2015-07-16 21:45 UTC (permalink / raw)
To: Umesh Tiwari
Cc: mingo, linux-kernel, gupta.namit, pankaj.m, Himanshu Maithani
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.
>
> 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 */
This comment isn't needed. People looking at this code wont know that
it use to be below.
-- Steve
> +#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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-16 21:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 11:28 [PATCH] ftrace: add tracing_thresh to function profile Umesh Tiwari
2015-07-13 18:39 ` Steven Rostedt
2015-07-16 21:45 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).