aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9e158cc84ced..fa5cee639962 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -338,7 +338,8 @@ static DECLARE_WAIT_QUEUE_HEAD(trace_wait);
338/* trace_flags holds trace_options default values */ 338/* trace_flags holds trace_options default values */
339unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK | 339unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK |
340 TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME | 340 TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME |
341 TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE; 341 TRACE_ITER_GRAPH_TIME | TRACE_ITER_RECORD_CMD | TRACE_ITER_OVERWRITE |
342 TRACE_ITER_IRQ_INFO;
342 343
343static int trace_stop_count; 344static int trace_stop_count;
344static DEFINE_RAW_SPINLOCK(tracing_start_lock); 345static DEFINE_RAW_SPINLOCK(tracing_start_lock);
@@ -426,6 +427,7 @@ static const char *trace_options[] = {
426 "record-cmd", 427 "record-cmd",
427 "overwrite", 428 "overwrite",
428 "disable_on_free", 429 "disable_on_free",
430 "irq-info",
429 NULL 431 NULL
430}; 432};
431 433
@@ -1857,10 +1859,20 @@ static void print_lat_help_header(struct seq_file *m)
1857 1859
1858static void print_func_help_header(struct seq_file *m) 1860static void print_func_help_header(struct seq_file *m)
1859{ 1861{
1860 seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n"); 1862 seq_puts(m, "# TASK-PID CPU# TIMESTAMP FUNCTION\n");
1861 seq_puts(m, "# | | | | |\n"); 1863 seq_puts(m, "# | | | | |\n");
1862} 1864}
1863 1865
1866static void print_func_help_header_irq(struct seq_file *m)
1867{
1868 seq_puts(m, "# _-----=> irqs-off\n");
1869 seq_puts(m, "# / _----=> need-resched\n");
1870 seq_puts(m, "# | / _---=> hardirq/softirq\n");
1871 seq_puts(m, "# || / _--=> preempt-depth\n");
1872 seq_puts(m, "# ||| / delay\n");
1873 seq_puts(m, "# TASK-PID CPU# |||| TIMESTAMP FUNCTION\n");
1874 seq_puts(m, "# | | | |||| | |\n");
1875}
1864 1876
1865void 1877void
1866print_trace_header(struct seq_file *m, struct trace_iterator *iter) 1878print_trace_header(struct seq_file *m, struct trace_iterator *iter)
@@ -2170,8 +2182,12 @@ void trace_default_header(struct seq_file *m)
2170 if (!(trace_flags & TRACE_ITER_VERBOSE)) 2182 if (!(trace_flags & TRACE_ITER_VERBOSE))
2171 print_lat_help_header(m); 2183 print_lat_help_header(m);
2172 } else { 2184 } else {
2173 if (!(trace_flags & TRACE_ITER_VERBOSE)) 2185 if (!(trace_flags & TRACE_ITER_VERBOSE)) {
2174 print_func_help_header(m); 2186 if (trace_flags & TRACE_ITER_IRQ_INFO)
2187 print_func_help_header_irq(m);
2188 else
2189 print_func_help_header(m);
2190 }
2175 } 2191 }
2176} 2192}
2177 2193