mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
ftrace: add tracing_thresh to function profile
This patch extends tracing_thresh functionality to function profile tracer. If tracing_thresh is set, print those entries only, whose average is > tracing thresh. Link: http://lkml.kernel.org/r/1434972488-8571-1-git-send-email-umesh.t@samsung.com Signed-off-by: Umesh Tiwari <umesh.t@samsung.com> [ Removed unnecessary 'moved' comment ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
72ac426a5b
commit
8e436ca042
1 changed files with 7 additions and 2 deletions
|
@ -613,13 +613,18 @@ static int function_stat_show(struct seq_file *m, void *v)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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);
|
kallsyms_lookup(rec->ip, NULL, NULL, NULL, str);
|
||||||
seq_printf(m, " %-30.30s %10lu", str, rec->counter);
|
seq_printf(m, " %-30.30s %10lu", str, rec->counter);
|
||||||
|
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
seq_puts(m, " ");
|
seq_puts(m, " ");
|
||||||
avg = rec->time;
|
|
||||||
do_div(avg, rec->counter);
|
|
||||||
|
|
||||||
/* Sample standard deviation (s^2) */
|
/* Sample standard deviation (s^2) */
|
||||||
if (rec->counter <= 1)
|
if (rec->counter <= 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue