mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
tracing: Add graph output support for irqsoff tracer
Add function graph output to irqsoff tracer. The graph output is enabled by setting new 'display-graph' trace option. Signed-off-by: Jiri Olsa <jolsa@redhat.com> LKML-Reference: <1270227683-14631-4-git-send-email-jolsa@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
d7a8d9e907
commit
62b915f106
5 changed files with 324 additions and 33 deletions
|
@ -179,7 +179,7 @@ unsigned long ftrace_return_to_handler(unsigned long frame_pointer)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __trace_graph_entry(struct trace_array *tr,
|
||||
int __trace_graph_entry(struct trace_array *tr,
|
||||
struct ftrace_graph_ent *trace,
|
||||
unsigned long flags,
|
||||
int pc)
|
||||
|
@ -246,7 +246,7 @@ int trace_graph_thresh_entry(struct ftrace_graph_ent *trace)
|
|||
return trace_graph_entry(trace);
|
||||
}
|
||||
|
||||
static void __trace_graph_return(struct trace_array *tr,
|
||||
void __trace_graph_return(struct trace_array *tr,
|
||||
struct ftrace_graph_ret *trace,
|
||||
unsigned long flags,
|
||||
int pc)
|
||||
|
@ -1093,6 +1093,11 @@ print_graph_function_flags(struct trace_iterator *iter, u32 flags)
|
|||
trace_assign_type(field, entry);
|
||||
return print_graph_return(&field->ret, s, entry, iter, flags);
|
||||
}
|
||||
case TRACE_STACK:
|
||||
case TRACE_FN:
|
||||
/* dont trace stack and functions as comments */
|
||||
return TRACE_TYPE_UNHANDLED;
|
||||
|
||||
default:
|
||||
return print_graph_comment(s, entry, iter, flags);
|
||||
}
|
||||
|
@ -1170,12 +1175,12 @@ void print_graph_headers_flags(struct seq_file *s, u32 flags)
|
|||
seq_printf(s, " | | | |\n");
|
||||
}
|
||||
|
||||
static void print_graph_headers(struct seq_file *s)
|
||||
void print_graph_headers(struct seq_file *s)
|
||||
{
|
||||
print_graph_headers_flags(s, tracer_flags.val);
|
||||
}
|
||||
|
||||
static void graph_trace_open(struct trace_iterator *iter)
|
||||
void graph_trace_open(struct trace_iterator *iter)
|
||||
{
|
||||
/* pid and depth on the last trace processed */
|
||||
struct fgraph_data *data;
|
||||
|
@ -1210,7 +1215,7 @@ static void graph_trace_open(struct trace_iterator *iter)
|
|||
pr_warning("function graph tracer: not enough memory\n");
|
||||
}
|
||||
|
||||
static void graph_trace_close(struct trace_iterator *iter)
|
||||
void graph_trace_close(struct trace_iterator *iter)
|
||||
{
|
||||
struct fgraph_data *data = iter->private;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue