diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 5b3c914053f2..b7380eee9fa1 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -463,13 +463,14 @@ int unregister_ftrace_event(struct trace_event *event) | |||
463 | * Standard events | 463 | * Standard events |
464 | */ | 464 | */ |
465 | 465 | ||
466 | int trace_nop_print(struct trace_iterator *iter, int flags) | 466 | enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags) |
467 | { | 467 | { |
468 | return TRACE_TYPE_HANDLED; | 468 | return TRACE_TYPE_HANDLED; |
469 | } | 469 | } |
470 | 470 | ||
471 | /* TRACE_FN */ | 471 | /* TRACE_FN */ |
472 | static int trace_fn_latency(struct trace_iterator *iter, int flags) | 472 | static enum print_line_t trace_fn_latency(struct trace_iterator *iter, |
473 | int flags) | ||
473 | { | 474 | { |
474 | struct ftrace_entry *field; | 475 | struct ftrace_entry *field; |
475 | struct trace_seq *s = &iter->seq; | 476 | struct trace_seq *s = &iter->seq; |
@@ -491,7 +492,7 @@ static int trace_fn_latency(struct trace_iterator *iter, int flags) | |||
491 | return TRACE_TYPE_PARTIAL_LINE; | 492 | return TRACE_TYPE_PARTIAL_LINE; |
492 | } | 493 | } |
493 | 494 | ||
494 | static int trace_fn_trace(struct trace_iterator *iter, int flags) | 495 | static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags) |
495 | { | 496 | { |
496 | struct ftrace_entry *field; | 497 | struct ftrace_entry *field; |
497 | struct trace_seq *s = &iter->seq; | 498 | struct trace_seq *s = &iter->seq; |
@@ -518,7 +519,7 @@ static int trace_fn_trace(struct trace_iterator *iter, int flags) | |||
518 | return TRACE_TYPE_PARTIAL_LINE; | 519 | return TRACE_TYPE_PARTIAL_LINE; |
519 | } | 520 | } |
520 | 521 | ||
521 | static int trace_fn_raw(struct trace_iterator *iter, int flags) | 522 | static enum print_line_t trace_fn_raw(struct trace_iterator *iter, int flags) |
522 | { | 523 | { |
523 | struct ftrace_entry *field; | 524 | struct ftrace_entry *field; |
524 | 525 | ||
@@ -532,7 +533,7 @@ static int trace_fn_raw(struct trace_iterator *iter, int flags) | |||
532 | return TRACE_TYPE_HANDLED; | 533 | return TRACE_TYPE_HANDLED; |
533 | } | 534 | } |
534 | 535 | ||
535 | static int trace_fn_hex(struct trace_iterator *iter, int flags) | 536 | static enum print_line_t trace_fn_hex(struct trace_iterator *iter, int flags) |
536 | { | 537 | { |
537 | struct ftrace_entry *field; | 538 | struct ftrace_entry *field; |
538 | struct trace_seq *s = &iter->seq; | 539 | struct trace_seq *s = &iter->seq; |
@@ -545,7 +546,7 @@ static int trace_fn_hex(struct trace_iterator *iter, int flags) | |||
545 | return TRACE_TYPE_HANDLED; | 546 | return TRACE_TYPE_HANDLED; |
546 | } | 547 | } |
547 | 548 | ||
548 | static int trace_fn_bin(struct trace_iterator *iter, int flags) | 549 | static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags) |
549 | { | 550 | { |
550 | struct ftrace_entry *field; | 551 | struct ftrace_entry *field; |
551 | struct trace_seq *s = &iter->seq; | 552 | struct trace_seq *s = &iter->seq; |
@@ -568,7 +569,8 @@ static struct trace_event trace_fn_event = { | |||
568 | }; | 569 | }; |
569 | 570 | ||
570 | /* TRACE_CTX an TRACE_WAKE */ | 571 | /* TRACE_CTX an TRACE_WAKE */ |
571 | static int trace_ctxwake_print(struct trace_iterator *iter, char *delim) | 572 | static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter, |
573 | char *delim) | ||
572 | { | 574 | { |
573 | struct ctx_switch_entry *field; | 575 | struct ctx_switch_entry *field; |
574 | char *comm; | 576 | char *comm; |
@@ -593,12 +595,13 @@ static int trace_ctxwake_print(struct trace_iterator *iter, char *delim) | |||
593 | return TRACE_TYPE_HANDLED; | 595 | return TRACE_TYPE_HANDLED; |
594 | } | 596 | } |
595 | 597 | ||
596 | static int trace_ctx_print(struct trace_iterator *iter, int flags) | 598 | static enum print_line_t trace_ctx_print(struct trace_iterator *iter, int flags) |
597 | { | 599 | { |
598 | return trace_ctxwake_print(iter, "==>"); | 600 | return trace_ctxwake_print(iter, "==>"); |
599 | } | 601 | } |
600 | 602 | ||
601 | static int trace_wake_print(struct trace_iterator *iter, int flags) | 603 | static enum print_line_t trace_wake_print(struct trace_iterator *iter, |
604 | int flags) | ||
602 | { | 605 | { |
603 | return trace_ctxwake_print(iter, " +"); | 606 | return trace_ctxwake_print(iter, " +"); |
604 | } | 607 | } |
@@ -626,12 +629,12 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S) | |||
626 | return TRACE_TYPE_HANDLED; | 629 | return TRACE_TYPE_HANDLED; |
627 | } | 630 | } |
628 | 631 | ||
629 | static int trace_ctx_raw(struct trace_iterator *iter, int flags) | 632 | static enum print_line_t trace_ctx_raw(struct trace_iterator *iter, int flags) |
630 | { | 633 | { |
631 | return trace_ctxwake_raw(iter, 0); | 634 | return trace_ctxwake_raw(iter, 0); |
632 | } | 635 | } |
633 | 636 | ||
634 | static int trace_wake_raw(struct trace_iterator *iter, int flags) | 637 | static enum print_line_t trace_wake_raw(struct trace_iterator *iter, int flags) |
635 | { | 638 | { |
636 | return trace_ctxwake_raw(iter, '+'); | 639 | return trace_ctxwake_raw(iter, '+'); |
637 | } | 640 | } |
@@ -660,17 +663,18 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S) | |||
660 | return TRACE_TYPE_HANDLED; | 663 | return TRACE_TYPE_HANDLED; |
661 | } | 664 | } |
662 | 665 | ||
663 | static int trace_ctx_hex(struct trace_iterator *iter, int flags) | 666 | static enum print_line_t trace_ctx_hex(struct trace_iterator *iter, int flags) |
664 | { | 667 | { |
665 | return trace_ctxwake_hex(iter, 0); | 668 | return trace_ctxwake_hex(iter, 0); |
666 | } | 669 | } |
667 | 670 | ||
668 | static int trace_wake_hex(struct trace_iterator *iter, int flags) | 671 | static enum print_line_t trace_wake_hex(struct trace_iterator *iter, int flags) |
669 | { | 672 | { |
670 | return trace_ctxwake_hex(iter, '+'); | 673 | return trace_ctxwake_hex(iter, '+'); |
671 | } | 674 | } |
672 | 675 | ||
673 | static int trace_ctxwake_bin(struct trace_iterator *iter, int flags) | 676 | static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter, |
677 | int flags) | ||
674 | { | 678 | { |
675 | struct ctx_switch_entry *field; | 679 | struct ctx_switch_entry *field; |
676 | struct trace_seq *s = &iter->seq; | 680 | struct trace_seq *s = &iter->seq; |
@@ -706,7 +710,8 @@ static struct trace_event trace_wake_event = { | |||
706 | }; | 710 | }; |
707 | 711 | ||
708 | /* TRACE_SPECIAL */ | 712 | /* TRACE_SPECIAL */ |
709 | static int trace_special_print(struct trace_iterator *iter, int flags) | 713 | static enum print_line_t trace_special_print(struct trace_iterator *iter, |
714 | int flags) | ||
710 | { | 715 | { |
711 | struct special_entry *field; | 716 | struct special_entry *field; |
712 | 717 | ||
@@ -721,7 +726,8 @@ static int trace_special_print(struct trace_iterator *iter, int flags) | |||
721 | return TRACE_TYPE_HANDLED; | 726 | return TRACE_TYPE_HANDLED; |
722 | } | 727 | } |
723 | 728 | ||
724 | static int trace_special_hex(struct trace_iterator *iter, int flags) | 729 | static enum print_line_t trace_special_hex(struct trace_iterator *iter, |
730 | int flags) | ||
725 | { | 731 | { |
726 | struct special_entry *field; | 732 | struct special_entry *field; |
727 | struct trace_seq *s = &iter->seq; | 733 | struct trace_seq *s = &iter->seq; |
@@ -735,7 +741,8 @@ static int trace_special_hex(struct trace_iterator *iter, int flags) | |||
735 | return TRACE_TYPE_HANDLED; | 741 | return TRACE_TYPE_HANDLED; |
736 | } | 742 | } |
737 | 743 | ||
738 | static int trace_special_bin(struct trace_iterator *iter, int flags) | 744 | static enum print_line_t trace_special_bin(struct trace_iterator *iter, |
745 | int flags) | ||
739 | { | 746 | { |
740 | struct special_entry *field; | 747 | struct special_entry *field; |
741 | struct trace_seq *s = &iter->seq; | 748 | struct trace_seq *s = &iter->seq; |
@@ -760,7 +767,8 @@ static struct trace_event trace_special_event = { | |||
760 | 767 | ||
761 | /* TRACE_STACK */ | 768 | /* TRACE_STACK */ |
762 | 769 | ||
763 | static int trace_stack_print(struct trace_iterator *iter, int flags) | 770 | static enum print_line_t trace_stack_print(struct trace_iterator *iter, |
771 | int flags) | ||
764 | { | 772 | { |
765 | struct stack_entry *field; | 773 | struct stack_entry *field; |
766 | struct trace_seq *s = &iter->seq; | 774 | struct trace_seq *s = &iter->seq; |
@@ -796,7 +804,8 @@ static struct trace_event trace_stack_event = { | |||
796 | }; | 804 | }; |
797 | 805 | ||
798 | /* TRACE_USER_STACK */ | 806 | /* TRACE_USER_STACK */ |
799 | static int trace_user_stack_print(struct trace_iterator *iter, int flags) | 807 | static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, |
808 | int flags) | ||
800 | { | 809 | { |
801 | struct userstack_entry *field; | 810 | struct userstack_entry *field; |
802 | struct trace_seq *s = &iter->seq; | 811 | struct trace_seq *s = &iter->seq; |
@@ -825,7 +834,8 @@ static struct trace_event trace_user_stack_event = { | |||
825 | }; | 834 | }; |
826 | 835 | ||
827 | /* TRACE_PRINT */ | 836 | /* TRACE_PRINT */ |
828 | static int trace_print_print(struct trace_iterator *iter, int flags) | 837 | static enum print_line_t trace_print_print(struct trace_iterator *iter, |
838 | int flags) | ||
829 | { | 839 | { |
830 | struct print_entry *field; | 840 | struct print_entry *field; |
831 | struct trace_seq *s = &iter->seq; | 841 | struct trace_seq *s = &iter->seq; |
@@ -844,7 +854,7 @@ static int trace_print_print(struct trace_iterator *iter, int flags) | |||
844 | return TRACE_TYPE_PARTIAL_LINE; | 854 | return TRACE_TYPE_PARTIAL_LINE; |
845 | } | 855 | } |
846 | 856 | ||
847 | static int trace_print_raw(struct trace_iterator *iter, int flags) | 857 | static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags) |
848 | { | 858 | { |
849 | struct print_entry *field; | 859 | struct print_entry *field; |
850 | 860 | ||