diff options
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 72b5ef868765..ffe1bb1eb620 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -25,7 +25,8 @@ enum trace_type { | |||
25 | TRACE_BRANCH, | 25 | TRACE_BRANCH, |
26 | TRACE_BOOT_CALL, | 26 | TRACE_BOOT_CALL, |
27 | TRACE_BOOT_RET, | 27 | TRACE_BOOT_RET, |
28 | TRACE_FN_RET, | 28 | TRACE_GRAPH_RET, |
29 | TRACE_GRAPH_ENT, | ||
29 | TRACE_USER_STACK, | 30 | TRACE_USER_STACK, |
30 | TRACE_BTS, | 31 | TRACE_BTS, |
31 | 32 | ||
@@ -56,14 +57,16 @@ struct ftrace_entry { | |||
56 | unsigned long parent_ip; | 57 | unsigned long parent_ip; |
57 | }; | 58 | }; |
58 | 59 | ||
60 | /* Function call entry */ | ||
61 | struct ftrace_graph_ent_entry { | ||
62 | struct trace_entry ent; | ||
63 | struct ftrace_graph_ent graph_ent; | ||
64 | }; | ||
65 | |||
59 | /* Function return entry */ | 66 | /* Function return entry */ |
60 | struct ftrace_graph_entry { | 67 | struct ftrace_graph_ret_entry { |
61 | struct trace_entry ent; | 68 | struct trace_entry ent; |
62 | unsigned long ip; | 69 | struct ftrace_graph_ret ret; |
63 | unsigned long parent_ip; | ||
64 | unsigned long long calltime; | ||
65 | unsigned long long rettime; | ||
66 | unsigned long overrun; | ||
67 | }; | 70 | }; |
68 | extern struct tracer boot_tracer; | 71 | extern struct tracer boot_tracer; |
69 | 72 | ||
@@ -264,7 +267,10 @@ extern void __ftrace_bad_type(void); | |||
264 | IF_ASSIGN(var, ent, struct trace_boot_call, TRACE_BOOT_CALL);\ | 267 | IF_ASSIGN(var, ent, struct trace_boot_call, TRACE_BOOT_CALL);\ |
265 | IF_ASSIGN(var, ent, struct trace_boot_ret, TRACE_BOOT_RET);\ | 268 | IF_ASSIGN(var, ent, struct trace_boot_ret, TRACE_BOOT_RET);\ |
266 | IF_ASSIGN(var, ent, struct trace_branch, TRACE_BRANCH); \ | 269 | IF_ASSIGN(var, ent, struct trace_branch, TRACE_BRANCH); \ |
267 | IF_ASSIGN(var, ent, struct ftrace_graph_entry, TRACE_FN_RET);\ | 270 | IF_ASSIGN(var, ent, struct ftrace_graph_ent_entry, \ |
271 | TRACE_GRAPH_ENT); \ | ||
272 | IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry, \ | ||
273 | TRACE_GRAPH_RET); \ | ||
268 | IF_ASSIGN(var, ent, struct bts_entry, TRACE_BTS);\ | 274 | IF_ASSIGN(var, ent, struct bts_entry, TRACE_BTS);\ |
269 | __ftrace_bad_type(); \ | 275 | __ftrace_bad_type(); \ |
270 | } while (0) | 276 | } while (0) |
@@ -397,9 +403,9 @@ void trace_function(struct trace_array *tr, | |||
397 | unsigned long ip, | 403 | unsigned long ip, |
398 | unsigned long parent_ip, | 404 | unsigned long parent_ip, |
399 | unsigned long flags, int pc); | 405 | unsigned long flags, int pc); |
400 | void | ||
401 | trace_function_graph(struct ftrace_graph_ret *trace); | ||
402 | 406 | ||
407 | void trace_graph_return(struct ftrace_graph_ret *trace); | ||
408 | void trace_graph_entry(struct ftrace_graph_ent *trace); | ||
403 | void trace_bts(struct trace_array *tr, | 409 | void trace_bts(struct trace_array *tr, |
404 | unsigned long from, | 410 | unsigned long from, |
405 | unsigned long to); | 411 | unsigned long to); |