diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 66ea23b64fe6..e876816fa8e7 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -712,10 +712,12 @@ print_graph_return(struct ftrace_graph_ret *trace, struct trace_seq *s, | |||
712 | } | 712 | } |
713 | 713 | ||
714 | static enum print_line_t | 714 | static enum print_line_t |
715 | print_graph_comment(struct bprint_entry *trace, struct trace_seq *s, | 715 | print_graph_comment(struct trace_seq *s, struct trace_entry *ent, |
716 | struct trace_entry *ent, struct trace_iterator *iter) | 716 | struct trace_iterator *iter) |
717 | { | 717 | { |
718 | unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); | ||
718 | struct fgraph_data *data = iter->private; | 719 | struct fgraph_data *data = iter->private; |
720 | struct trace_event *event; | ||
719 | int depth = 0; | 721 | int depth = 0; |
720 | int ret; | 722 | int ret; |
721 | int i; | 723 | int i; |
@@ -751,9 +753,26 @@ print_graph_comment(struct bprint_entry *trace, struct trace_seq *s, | |||
751 | if (!ret) | 753 | if (!ret) |
752 | return TRACE_TYPE_PARTIAL_LINE; | 754 | return TRACE_TYPE_PARTIAL_LINE; |
753 | 755 | ||
754 | ret = trace_seq_bprintf(s, trace->fmt, trace->buf); | 756 | switch (iter->ent->type) { |
755 | if (!ret) | 757 | case TRACE_BPRINT: |
756 | return TRACE_TYPE_PARTIAL_LINE; | 758 | ret = trace_print_bprintk_msg_only(iter); |
759 | if (ret != TRACE_TYPE_HANDLED) | ||
760 | return ret; | ||
761 | break; | ||
762 | case TRACE_PRINT: | ||
763 | ret = trace_print_printk_msg_only(iter); | ||
764 | if (ret != TRACE_TYPE_HANDLED) | ||
765 | return ret; | ||
766 | break; | ||
767 | default: | ||
768 | event = ftrace_find_event(ent->type); | ||
769 | if (!event) | ||
770 | return TRACE_TYPE_UNHANDLED; | ||
771 | |||
772 | ret = event->trace(iter, sym_flags); | ||
773 | if (ret != TRACE_TYPE_HANDLED) | ||
774 | return ret; | ||
775 | } | ||
757 | 776 | ||
758 | /* Strip ending newline */ | 777 | /* Strip ending newline */ |
759 | if (s->buffer[s->len - 1] == '\n') { | 778 | if (s->buffer[s->len - 1] == '\n') { |
@@ -772,8 +791,8 @@ print_graph_comment(struct bprint_entry *trace, struct trace_seq *s, | |||
772 | enum print_line_t | 791 | enum print_line_t |
773 | print_graph_function(struct trace_iterator *iter) | 792 | print_graph_function(struct trace_iterator *iter) |
774 | { | 793 | { |
775 | struct trace_seq *s = &iter->seq; | ||
776 | struct trace_entry *entry = iter->ent; | 794 | struct trace_entry *entry = iter->ent; |
795 | struct trace_seq *s = &iter->seq; | ||
777 | 796 | ||
778 | switch (entry->type) { | 797 | switch (entry->type) { |
779 | case TRACE_GRAPH_ENT: { | 798 | case TRACE_GRAPH_ENT: { |
@@ -786,14 +805,11 @@ print_graph_function(struct trace_iterator *iter) | |||
786 | trace_assign_type(field, entry); | 805 | trace_assign_type(field, entry); |
787 | return print_graph_return(&field->ret, s, entry, iter); | 806 | return print_graph_return(&field->ret, s, entry, iter); |
788 | } | 807 | } |
789 | case TRACE_BPRINT: { | ||
790 | struct bprint_entry *field; | ||
791 | trace_assign_type(field, entry); | ||
792 | return print_graph_comment(field, s, entry, iter); | ||
793 | } | ||
794 | default: | 808 | default: |
795 | return TRACE_TYPE_UNHANDLED; | 809 | return print_graph_comment(s, entry, iter); |
796 | } | 810 | } |
811 | |||
812 | return TRACE_TYPE_HANDLED; | ||
797 | } | 813 | } |
798 | 814 | ||
799 | static void print_graph_headers(struct seq_file *s) | 815 | static void print_graph_headers(struct seq_file *s) |