diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/Kconfig | 6 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 4 | ||||
-rw-r--r-- | kernel/trace/trace_event_types.h | 3 | ||||
-rw-r--r-- | kernel/trace/trace_output.c | 3 | ||||
-rw-r--r-- | kernel/trace/trace_stack.c | 4 |
5 files changed, 11 insertions, 9 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 1551f47e7669..019f380fd764 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -226,13 +226,13 @@ config BOOT_TRACER | |||
226 | the timings of the initcalls and traces key events and the identity | 226 | the timings of the initcalls and traces key events and the identity |
227 | of tasks that can cause boot delays, such as context-switches. | 227 | of tasks that can cause boot delays, such as context-switches. |
228 | 228 | ||
229 | Its aim is to be parsed by the /scripts/bootgraph.pl tool to | 229 | Its aim is to be parsed by the scripts/bootgraph.pl tool to |
230 | produce pretty graphics about boot inefficiencies, giving a visual | 230 | produce pretty graphics about boot inefficiencies, giving a visual |
231 | representation of the delays during initcalls - but the raw | 231 | representation of the delays during initcalls - but the raw |
232 | /debug/tracing/trace text output is readable too. | 232 | /debug/tracing/trace text output is readable too. |
233 | 233 | ||
234 | You must pass in ftrace=initcall to the kernel command line | 234 | You must pass in initcall_debug and ftrace=initcall to the kernel |
235 | to enable this on bootup. | 235 | command line to enable this on bootup. |
236 | 236 | ||
237 | config TRACE_BRANCH_PROFILING | 237 | config TRACE_BRANCH_PROFILING |
238 | bool | 238 | bool |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index f3716bf04df6..bce9e01a29c8 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -3160,10 +3160,10 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
3160 | 3160 | ||
3161 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); | 3161 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); |
3162 | 3162 | ||
3163 | if (ret || !write || (last_ftrace_enabled == ftrace_enabled)) | 3163 | if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled)) |
3164 | goto out; | 3164 | goto out; |
3165 | 3165 | ||
3166 | last_ftrace_enabled = ftrace_enabled; | 3166 | last_ftrace_enabled = !!ftrace_enabled; |
3167 | 3167 | ||
3168 | if (ftrace_enabled) { | 3168 | if (ftrace_enabled) { |
3169 | 3169 | ||
diff --git a/kernel/trace/trace_event_types.h b/kernel/trace/trace_event_types.h index 5e32e375134d..6db005e12487 100644 --- a/kernel/trace/trace_event_types.h +++ b/kernel/trace/trace_event_types.h | |||
@@ -26,6 +26,9 @@ TRACE_EVENT_FORMAT(funcgraph_exit, TRACE_GRAPH_RET, | |||
26 | ftrace_graph_ret_entry, ignore, | 26 | ftrace_graph_ret_entry, ignore, |
27 | TRACE_STRUCT( | 27 | TRACE_STRUCT( |
28 | TRACE_FIELD(unsigned long, ret.func, func) | 28 | TRACE_FIELD(unsigned long, ret.func, func) |
29 | TRACE_FIELD(unsigned long long, ret.calltime, calltime) | ||
30 | TRACE_FIELD(unsigned long long, ret.rettime, rettime) | ||
31 | TRACE_FIELD(unsigned long, ret.overrun, overrun) | ||
29 | TRACE_FIELD(int, ret.depth, depth) | 32 | TRACE_FIELD(int, ret.depth, depth) |
30 | ), | 33 | ), |
31 | TP_RAW_FMT("<-- %lx (%d)") | 34 | TP_RAW_FMT("<-- %lx (%d)") |
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 7938f3ae93e3..e0c2545622e8 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -27,8 +27,7 @@ void trace_print_seq(struct seq_file *m, struct trace_seq *s) | |||
27 | { | 27 | { |
28 | int len = s->len >= PAGE_SIZE ? PAGE_SIZE - 1 : s->len; | 28 | int len = s->len >= PAGE_SIZE ? PAGE_SIZE - 1 : s->len; |
29 | 29 | ||
30 | s->buffer[len] = 0; | 30 | seq_write(m, s->buffer, len); |
31 | seq_puts(m, s->buffer); | ||
32 | 31 | ||
33 | trace_seq_init(s); | 32 | trace_seq_init(s); |
34 | } | 33 | } |
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 2d7aebd71dbd..e644af910124 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
@@ -326,10 +326,10 @@ stack_trace_sysctl(struct ctl_table *table, int write, | |||
326 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); | 326 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); |
327 | 327 | ||
328 | if (ret || !write || | 328 | if (ret || !write || |
329 | (last_stack_tracer_enabled == stack_tracer_enabled)) | 329 | (last_stack_tracer_enabled == !!stack_tracer_enabled)) |
330 | goto out; | 330 | goto out; |
331 | 331 | ||
332 | last_stack_tracer_enabled = stack_tracer_enabled; | 332 | last_stack_tracer_enabled = !!stack_tracer_enabled; |
333 | 333 | ||
334 | if (stack_tracer_enabled) | 334 | if (stack_tracer_enabled) |
335 | register_ftrace_function(&trace_ops); | 335 | register_ftrace_function(&trace_ops); |