aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 0565ae9a2210..41f026bfc9ed 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -505,13 +505,41 @@ extern unsigned long trace_flags;
505/* Standard output formatting function used for function return traces */ 505/* Standard output formatting function used for function return traces */
506#ifdef CONFIG_FUNCTION_GRAPH_TRACER 506#ifdef CONFIG_FUNCTION_GRAPH_TRACER
507extern enum print_line_t print_graph_function(struct trace_iterator *iter); 507extern enum print_line_t print_graph_function(struct trace_iterator *iter);
508
509#ifdef CONFIG_DYNAMIC_FTRACE
510/* TODO: make this variable */
511#define FTRACE_GRAPH_MAX_FUNCS 32
512extern int ftrace_graph_count;
513extern unsigned long ftrace_graph_funcs[FTRACE_GRAPH_MAX_FUNCS];
514
515static inline int ftrace_graph_addr(unsigned long addr)
516{
517 int i;
518
519 if (!ftrace_graph_count || test_tsk_trace_graph(current))
520 return 1;
521
522 for (i = 0; i < ftrace_graph_count; i++) {
523 if (addr == ftrace_graph_funcs[i])
524 return 1;
525 }
526
527 return 0;
528}
508#else 529#else
530static inline int ftrace_trace_addr(unsigned long addr)
531{
532 return 1
533}
534#endif /* CONFIG_DYNAMIC_FTRACE */
535
536#else /* CONFIG_FUNCTION_GRAPH_TRACER */
509static inline enum print_line_t 537static inline enum print_line_t
510print_graph_function(struct trace_iterator *iter) 538print_graph_function(struct trace_iterator *iter)
511{ 539{
512 return TRACE_TYPE_UNHANDLED; 540 return TRACE_TYPE_UNHANDLED;
513} 541}
514#endif 542#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
515 543
516/* 544/*
517 * trace_iterator_flags is an enumeration that defines bit 545 * trace_iterator_flags is an enumeration that defines bit