aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r--kernel/trace/trace_functions_graph.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index ee791a9650c..48af4937438 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -368,6 +368,7 @@ static enum print_line_t
368print_graph_lat_fmt(struct trace_seq *s, struct trace_entry *entry) 368print_graph_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
369{ 369{
370 int hardirq, softirq; 370 int hardirq, softirq;
371 int ret;
371 372
372 hardirq = entry->flags & TRACE_FLAG_HARDIRQ; 373 hardirq = entry->flags & TRACE_FLAG_HARDIRQ;
373 softirq = entry->flags & TRACE_FLAG_SOFTIRQ; 374 softirq = entry->flags & TRACE_FLAG_SOFTIRQ;
@@ -382,6 +383,13 @@ print_graph_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
382 hardirq ? 'h' : softirq ? 's' : '.')) 383 hardirq ? 'h' : softirq ? 's' : '.'))
383 return 0; 384 return 0;
384 385
386 if (entry->lock_depth < 0)
387 ret = trace_seq_putc(s, '.');
388 else
389 ret = trace_seq_printf(s, "%d", entry->lock_depth);
390 if (!ret)
391 return 0;
392
385 if (entry->preempt_count) 393 if (entry->preempt_count)
386 return trace_seq_printf(s, "%x", entry->preempt_count); 394 return trace_seq_printf(s, "%x", entry->preempt_count);
387 return trace_seq_puts(s, "."); 395 return trace_seq_puts(s, ".");
@@ -1001,8 +1009,8 @@ static void print_lat_header(struct seq_file *s)
1001 seq_printf(s, "#%.*s / _----=> need-resched \n", size, spaces); 1009 seq_printf(s, "#%.*s / _----=> need-resched \n", size, spaces);
1002 seq_printf(s, "#%.*s| / _---=> hardirq/softirq \n", size, spaces); 1010 seq_printf(s, "#%.*s| / _---=> hardirq/softirq \n", size, spaces);
1003 seq_printf(s, "#%.*s|| / _--=> preempt-depth \n", size, spaces); 1011 seq_printf(s, "#%.*s|| / _--=> preempt-depth \n", size, spaces);
1004 seq_printf(s, "#%.*s||| / \n", size, spaces); 1012 seq_printf(s, "#%.*s||| / _-=> lock-depth \n", size, spaces);
1005 seq_printf(s, "#%.*s|||| \n", size, spaces); 1013 seq_printf(s, "#%.*s|||| / \n", size, spaces);
1006} 1014}
1007 1015
1008static void print_graph_headers(struct seq_file *s) 1016static void print_graph_headers(struct seq_file *s)
@@ -1021,7 +1029,7 @@ static void print_graph_headers(struct seq_file *s)
1021 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC) 1029 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC)
1022 seq_printf(s, " TASK/PID "); 1030 seq_printf(s, " TASK/PID ");
1023 if (lat) 1031 if (lat)
1024 seq_printf(s, "||||"); 1032 seq_printf(s, "|||||");
1025 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) 1033 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
1026 seq_printf(s, " DURATION "); 1034 seq_printf(s, " DURATION ");
1027 seq_printf(s, " FUNCTION CALLS\n"); 1035 seq_printf(s, " FUNCTION CALLS\n");
@@ -1035,7 +1043,7 @@ static void print_graph_headers(struct seq_file *s)
1035 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC) 1043 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC)
1036 seq_printf(s, " | | "); 1044 seq_printf(s, " | | ");
1037 if (lat) 1045 if (lat)
1038 seq_printf(s, "||||"); 1046 seq_printf(s, "|||||");
1039 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) 1047 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
1040 seq_printf(s, " | | "); 1048 seq_printf(s, " | | ");
1041 seq_printf(s, " | | | |\n"); 1049 seq_printf(s, " | | | |\n");