aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-23 23:12:58 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-24 23:41:09 -0400
commit0706f1c48ca8a7ab478090b4e38f2e578ae2bfe0 (patch)
tree26b79090f8e7e62796bb871ff089d04799919855 /kernel/trace/trace.h
parent493762fc534c71d11d489f872c4b4a2c61173668 (diff)
tracing: adding function timings to function profiler
If the function graph trace is enabled, the function profiler will use it to take the timing of the functions. cat /debug/tracing/trace_stat/functions Function Hit Time -------- --- ---- mwait_idle 127 183028.4 us schedule 26 151997.7 us __schedule 31 151975.1 us sys_wait4 2 74080.53 us do_wait 2 74077.80 us sys_newlstat 138 39929.16 us do_path_lookup 179 39845.79 us vfs_lstat_fd 138 39761.97 us user_path_at 153 39469.58 us path_walk 179 39435.76 us __link_path_walk 189 39143.73 us [...] Note the times are skewed due to the function graph tracer not taking into account schedules. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index d7410bbb9a80..c66ca3b66050 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -605,6 +605,8 @@ extern unsigned long trace_flags;
605/* Standard output formatting function used for function return traces */ 605/* Standard output formatting function used for function return traces */
606#ifdef CONFIG_FUNCTION_GRAPH_TRACER 606#ifdef CONFIG_FUNCTION_GRAPH_TRACER
607extern enum print_line_t print_graph_function(struct trace_iterator *iter); 607extern enum print_line_t print_graph_function(struct trace_iterator *iter);
608extern enum print_line_t
609trace_print_graph_duration(unsigned long long duration, struct trace_seq *s);
608 610
609#ifdef CONFIG_DYNAMIC_FTRACE 611#ifdef CONFIG_DYNAMIC_FTRACE
610/* TODO: make this variable */ 612/* TODO: make this variable */
@@ -636,7 +638,6 @@ static inline int ftrace_graph_addr(unsigned long addr)
636 return 1; 638 return 1;
637} 639}
638#endif /* CONFIG_DYNAMIC_FTRACE */ 640#endif /* CONFIG_DYNAMIC_FTRACE */
639
640#else /* CONFIG_FUNCTION_GRAPH_TRACER */ 641#else /* CONFIG_FUNCTION_GRAPH_TRACER */
641static inline enum print_line_t 642static inline enum print_line_t
642print_graph_function(struct trace_iterator *iter) 643print_graph_function(struct trace_iterator *iter)