diff options
| author | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
| commit | 64960848abd18d0bcde3f53ffa7ed0b631e6b25d (patch) | |
| tree | 8424a1c550a98ce09f127425fde9b7b5f2f5027a /kernel/trace/trace_output.c | |
| parent | 2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff) | |
| parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'kernel/trace/trace_output.c')
| -rw-r--r-- | kernel/trace/trace_output.c | 153 |
1 files changed, 108 insertions, 45 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 2404c129a8c9..57c1b4596470 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
| @@ -209,6 +209,7 @@ int trace_seq_putc(struct trace_seq *s, unsigned char c) | |||
| 209 | 209 | ||
| 210 | return 1; | 210 | return 1; |
| 211 | } | 211 | } |
| 212 | EXPORT_SYMBOL(trace_seq_putc); | ||
| 212 | 213 | ||
| 213 | int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len) | 214 | int trace_seq_putmem(struct trace_seq *s, const void *mem, size_t len) |
| 214 | { | 215 | { |
| @@ -355,6 +356,21 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, | |||
| 355 | } | 356 | } |
| 356 | EXPORT_SYMBOL(ftrace_print_symbols_seq); | 357 | EXPORT_SYMBOL(ftrace_print_symbols_seq); |
| 357 | 358 | ||
| 359 | const char * | ||
| 360 | ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len) | ||
| 361 | { | ||
| 362 | int i; | ||
| 363 | const char *ret = p->buffer + p->len; | ||
| 364 | |||
| 365 | for (i = 0; i < buf_len; i++) | ||
| 366 | trace_seq_printf(p, "%s%2.2x", i == 0 ? "" : " ", buf[i]); | ||
| 367 | |||
| 368 | trace_seq_putc(p, 0); | ||
| 369 | |||
| 370 | return ret; | ||
| 371 | } | ||
| 372 | EXPORT_SYMBOL(ftrace_print_hex_seq); | ||
| 373 | |||
| 358 | #ifdef CONFIG_KRETPROBES | 374 | #ifdef CONFIG_KRETPROBES |
| 359 | static inline const char *kretprobed(const char *name) | 375 | static inline const char *kretprobed(const char *name) |
| 360 | { | 376 | { |
| @@ -726,6 +742,9 @@ int register_ftrace_event(struct trace_event *event) | |||
| 726 | if (WARN_ON(!event)) | 742 | if (WARN_ON(!event)) |
| 727 | goto out; | 743 | goto out; |
| 728 | 744 | ||
| 745 | if (WARN_ON(!event->funcs)) | ||
| 746 | goto out; | ||
| 747 | |||
| 729 | INIT_LIST_HEAD(&event->list); | 748 | INIT_LIST_HEAD(&event->list); |
| 730 | 749 | ||
| 731 | if (!event->type) { | 750 | if (!event->type) { |
| @@ -758,14 +777,14 @@ int register_ftrace_event(struct trace_event *event) | |||
| 758 | goto out; | 777 | goto out; |
| 759 | } | 778 | } |
| 760 | 779 | ||
| 761 | if (event->trace == NULL) | 780 | if (event->funcs->trace == NULL) |
| 762 | event->trace = trace_nop_print; | 781 | event->funcs->trace = trace_nop_print; |
| 763 | if (event->raw == NULL) | 782 | if (event->funcs->raw == NULL) |
| 764 | event->raw = trace_nop_print; | 783 | event->funcs->raw = trace_nop_print; |
| 765 | if (event->hex == NULL) | 784 | if (event->funcs->hex == NULL) |
| 766 | event->hex = trace_nop_print; | 785 | event->funcs->hex = trace_nop_print; |
| 767 | if (event->binary == NULL) | 786 | if (event->funcs->binary == NULL) |
| 768 | event->binary = trace_nop_print; | 787 | event->funcs->binary = trace_nop_print; |
| 769 | 788 | ||
| 770 | key = event->type & (EVENT_HASHSIZE - 1); | 789 | key = event->type & (EVENT_HASHSIZE - 1); |
| 771 | 790 | ||
| @@ -807,13 +826,15 @@ EXPORT_SYMBOL_GPL(unregister_ftrace_event); | |||
| 807 | * Standard events | 826 | * Standard events |
| 808 | */ | 827 | */ |
| 809 | 828 | ||
| 810 | enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags) | 829 | enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags, |
| 830 | struct trace_event *event) | ||
| 811 | { | 831 | { |
| 812 | return TRACE_TYPE_HANDLED; | 832 | return TRACE_TYPE_HANDLED; |
| 813 | } | 833 | } |
| 814 | 834 | ||
| 815 | /* TRACE_FN */ | 835 | /* TRACE_FN */ |
| 816 | static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags) | 836 | static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags, |
| 837 | struct trace_event *event) | ||
| 817 | { | 838 | { |
| 818 | struct ftrace_entry *field; | 839 | struct ftrace_entry *field; |
| 819 | struct trace_seq *s = &iter->seq; | 840 | struct trace_seq *s = &iter->seq; |
| @@ -840,7 +861,8 @@ static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags) | |||
| 840 | return TRACE_TYPE_PARTIAL_LINE; | 861 | return TRACE_TYPE_PARTIAL_LINE; |
| 841 | } | 862 | } |
| 842 | 863 | ||
| 843 | static enum print_line_t trace_fn_raw(struct trace_iterator *iter, int flags) | 864 | static enum print_line_t trace_fn_raw(struct trace_iterator *iter, int flags, |
| 865 | struct trace_event *event) | ||
| 844 | { | 866 | { |
| 845 | struct ftrace_entry *field; | 867 | struct ftrace_entry *field; |
| 846 | 868 | ||
| @@ -854,7 +876,8 @@ static enum print_line_t trace_fn_raw(struct trace_iterator *iter, int flags) | |||
| 854 | return TRACE_TYPE_HANDLED; | 876 | return TRACE_TYPE_HANDLED; |
| 855 | } | 877 | } |
| 856 | 878 | ||
| 857 | static enum print_line_t trace_fn_hex(struct trace_iterator *iter, int flags) | 879 | static enum print_line_t trace_fn_hex(struct trace_iterator *iter, int flags, |
| 880 | struct trace_event *event) | ||
| 858 | { | 881 | { |
| 859 | struct ftrace_entry *field; | 882 | struct ftrace_entry *field; |
| 860 | struct trace_seq *s = &iter->seq; | 883 | struct trace_seq *s = &iter->seq; |
| @@ -867,7 +890,8 @@ static enum print_line_t trace_fn_hex(struct trace_iterator *iter, int flags) | |||
| 867 | return TRACE_TYPE_HANDLED; | 890 | return TRACE_TYPE_HANDLED; |
| 868 | } | 891 | } |
| 869 | 892 | ||
| 870 | static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags) | 893 | static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags, |
| 894 | struct trace_event *event) | ||
| 871 | { | 895 | { |
| 872 | struct ftrace_entry *field; | 896 | struct ftrace_entry *field; |
| 873 | struct trace_seq *s = &iter->seq; | 897 | struct trace_seq *s = &iter->seq; |
| @@ -880,14 +904,18 @@ static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags) | |||
| 880 | return TRACE_TYPE_HANDLED; | 904 | return TRACE_TYPE_HANDLED; |
| 881 | } | 905 | } |
| 882 | 906 | ||
| 883 | static struct trace_event trace_fn_event = { | 907 | static struct trace_event_functions trace_fn_funcs = { |
| 884 | .type = TRACE_FN, | ||
| 885 | .trace = trace_fn_trace, | 908 | .trace = trace_fn_trace, |
| 886 | .raw = trace_fn_raw, | 909 | .raw = trace_fn_raw, |
| 887 | .hex = trace_fn_hex, | 910 | .hex = trace_fn_hex, |
| 888 | .binary = trace_fn_bin, | 911 | .binary = trace_fn_bin, |
| 889 | }; | 912 | }; |
| 890 | 913 | ||
| 914 | static struct trace_event trace_fn_event = { | ||
| 915 | .type = TRACE_FN, | ||
| 916 | .funcs = &trace_fn_funcs, | ||
| 917 | }; | ||
| 918 | |||
| 891 | /* TRACE_CTX an TRACE_WAKE */ | 919 | /* TRACE_CTX an TRACE_WAKE */ |
| 892 | static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter, | 920 | static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter, |
| 893 | char *delim) | 921 | char *delim) |
| @@ -916,13 +944,14 @@ static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter, | |||
| 916 | return TRACE_TYPE_HANDLED; | 944 | return TRACE_TYPE_HANDLED; |
| 917 | } | 945 | } |
| 918 | 946 | ||
| 919 | static enum print_line_t trace_ctx_print(struct trace_iterator *iter, int flags) | 947 | static enum print_line_t trace_ctx_print(struct trace_iterator *iter, int flags, |
| 948 | struct trace_event *event) | ||
| 920 | { | 949 | { |
| 921 | return trace_ctxwake_print(iter, "==>"); | 950 | return trace_ctxwake_print(iter, "==>"); |
| 922 | } | 951 | } |
| 923 | 952 | ||
| 924 | static enum print_line_t trace_wake_print(struct trace_iterator *iter, | 953 | static enum print_line_t trace_wake_print(struct trace_iterator *iter, |
| 925 | int flags) | 954 | int flags, struct trace_event *event) |
| 926 | { | 955 | { |
| 927 | return trace_ctxwake_print(iter, " +"); | 956 | return trace_ctxwake_print(iter, " +"); |
| 928 | } | 957 | } |
| @@ -950,12 +979,14 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S) | |||
| 950 | return TRACE_TYPE_HANDLED; | 979 | return TRACE_TYPE_HANDLED; |
| 951 | } | 980 | } |
| 952 | 981 | ||
| 953 | static enum print_line_t trace_ctx_raw(struct trace_iterator *iter, int flags) | 982 | static enum print_line_t trace_ctx_raw(struct trace_iterator *iter, int flags, |
| 983 | struct trace_event *event) | ||
| 954 | { | 984 | { |
| 955 | return trace_ctxwake_raw(iter, 0); | 985 | return trace_ctxwake_raw(iter, 0); |
| 956 | } | 986 | } |
| 957 | 987 | ||
| 958 | static enum print_line_t trace_wake_raw(struct trace_iterator *iter, int flags) | 988 | static enum print_line_t trace_wake_raw(struct trace_iterator *iter, int flags, |
| 989 | struct trace_event *event) | ||
| 959 | { | 990 | { |
| 960 | return trace_ctxwake_raw(iter, '+'); | 991 | return trace_ctxwake_raw(iter, '+'); |
| 961 | } | 992 | } |
| @@ -984,18 +1015,20 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S) | |||
| 984 | return TRACE_TYPE_HANDLED; | 1015 | return TRACE_TYPE_HANDLED; |
| 985 | } | 1016 | } |
| 986 | 1017 | ||
| 987 | static enum print_line_t trace_ctx_hex(struct trace_iterator *iter, int flags) | 1018 | static enum print_line_t trace_ctx_hex(struct trace_iterator *iter, int flags, |
| 1019 | struct trace_event *event) | ||
| 988 | { | 1020 | { |
| 989 | return trace_ctxwake_hex(iter, 0); | 1021 | return trace_ctxwake_hex(iter, 0); |
| 990 | } | 1022 | } |
| 991 | 1023 | ||
| 992 | static enum print_line_t trace_wake_hex(struct trace_iterator *iter, int flags) | 1024 | static enum print_line_t trace_wake_hex(struct trace_iterator *iter, int flags, |
| 1025 | struct trace_event *event) | ||
| 993 | { | 1026 | { |
| 994 | return trace_ctxwake_hex(iter, '+'); | 1027 | return trace_ctxwake_hex(iter, '+'); |
| 995 | } | 1028 | } |
| 996 | 1029 | ||
| 997 | static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter, | 1030 | static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter, |
| 998 | int flags) | 1031 | int flags, struct trace_event *event) |
| 999 | { | 1032 | { |
| 1000 | struct ctx_switch_entry *field; | 1033 | struct ctx_switch_entry *field; |
| 1001 | struct trace_seq *s = &iter->seq; | 1034 | struct trace_seq *s = &iter->seq; |
| @@ -1012,25 +1045,33 @@ static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter, | |||
| 1012 | return TRACE_TYPE_HANDLED; | 1045 | return TRACE_TYPE_HANDLED; |
| 1013 | } | 1046 | } |
| 1014 | 1047 | ||
| 1015 | static struct trace_event trace_ctx_event = { | 1048 | static struct trace_event_functions trace_ctx_funcs = { |
| 1016 | .type = TRACE_CTX, | ||
| 1017 | .trace = trace_ctx_print, | 1049 | .trace = trace_ctx_print, |
| 1018 | .raw = trace_ctx_raw, | 1050 | .raw = trace_ctx_raw, |
| 1019 | .hex = trace_ctx_hex, | 1051 | .hex = trace_ctx_hex, |
| 1020 | .binary = trace_ctxwake_bin, | 1052 | .binary = trace_ctxwake_bin, |
| 1021 | }; | 1053 | }; |
| 1022 | 1054 | ||
| 1023 | static struct trace_event trace_wake_event = { | 1055 | static struct trace_event trace_ctx_event = { |
| 1024 | .type = TRACE_WAKE, | 1056 | .type = TRACE_CTX, |
| 1057 | .funcs = &trace_ctx_funcs, | ||
| 1058 | }; | ||
| 1059 | |||
| 1060 | static struct trace_event_functions trace_wake_funcs = { | ||
| 1025 | .trace = trace_wake_print, | 1061 | .trace = trace_wake_print, |
| 1026 | .raw = trace_wake_raw, | 1062 | .raw = trace_wake_raw, |
| 1027 | .hex = trace_wake_hex, | 1063 | .hex = trace_wake_hex, |
| 1028 | .binary = trace_ctxwake_bin, | 1064 | .binary = trace_ctxwake_bin, |
| 1029 | }; | 1065 | }; |
| 1030 | 1066 | ||
| 1067 | static struct trace_event trace_wake_event = { | ||
| 1068 | .type = TRACE_WAKE, | ||
| 1069 | .funcs = &trace_wake_funcs, | ||
| 1070 | }; | ||
| 1071 | |||
| 1031 | /* TRACE_SPECIAL */ | 1072 | /* TRACE_SPECIAL */ |
| 1032 | static enum print_line_t trace_special_print(struct trace_iterator *iter, | 1073 | static enum print_line_t trace_special_print(struct trace_iterator *iter, |
| 1033 | int flags) | 1074 | int flags, struct trace_event *event) |
| 1034 | { | 1075 | { |
| 1035 | struct special_entry *field; | 1076 | struct special_entry *field; |
| 1036 | 1077 | ||
| @@ -1046,7 +1087,7 @@ static enum print_line_t trace_special_print(struct trace_iterator *iter, | |||
| 1046 | } | 1087 | } |
| 1047 | 1088 | ||
| 1048 | static enum print_line_t trace_special_hex(struct trace_iterator *iter, | 1089 | static enum print_line_t trace_special_hex(struct trace_iterator *iter, |
| 1049 | int flags) | 1090 | int flags, struct trace_event *event) |
| 1050 | { | 1091 | { |
| 1051 | struct special_entry *field; | 1092 | struct special_entry *field; |
| 1052 | struct trace_seq *s = &iter->seq; | 1093 | struct trace_seq *s = &iter->seq; |
| @@ -1061,7 +1102,7 @@ static enum print_line_t trace_special_hex(struct trace_iterator *iter, | |||
| 1061 | } | 1102 | } |
| 1062 | 1103 | ||
| 1063 | static enum print_line_t trace_special_bin(struct trace_iterator *iter, | 1104 | static enum print_line_t trace_special_bin(struct trace_iterator *iter, |
| 1064 | int flags) | 1105 | int flags, struct trace_event *event) |
| 1065 | { | 1106 | { |
| 1066 | struct special_entry *field; | 1107 | struct special_entry *field; |
| 1067 | struct trace_seq *s = &iter->seq; | 1108 | struct trace_seq *s = &iter->seq; |
| @@ -1075,18 +1116,22 @@ static enum print_line_t trace_special_bin(struct trace_iterator *iter, | |||
| 1075 | return TRACE_TYPE_HANDLED; | 1116 | return TRACE_TYPE_HANDLED; |
| 1076 | } | 1117 | } |
| 1077 | 1118 | ||
| 1078 | static struct trace_event trace_special_event = { | 1119 | static struct trace_event_functions trace_special_funcs = { |
| 1079 | .type = TRACE_SPECIAL, | ||
| 1080 | .trace = trace_special_print, | 1120 | .trace = trace_special_print, |
| 1081 | .raw = trace_special_print, | 1121 | .raw = trace_special_print, |
| 1082 | .hex = trace_special_hex, | 1122 | .hex = trace_special_hex, |
| 1083 | .binary = trace_special_bin, | 1123 | .binary = trace_special_bin, |
| 1084 | }; | 1124 | }; |
| 1085 | 1125 | ||
| 1126 | static struct trace_event trace_special_event = { | ||
| 1127 | .type = TRACE_SPECIAL, | ||
| 1128 | .funcs = &trace_special_funcs, | ||
| 1129 | }; | ||
| 1130 | |||
| 1086 | /* TRACE_STACK */ | 1131 | /* TRACE_STACK */ |
| 1087 | 1132 | ||
| 1088 | static enum print_line_t trace_stack_print(struct trace_iterator *iter, | 1133 | static enum print_line_t trace_stack_print(struct trace_iterator *iter, |
| 1089 | int flags) | 1134 | int flags, struct trace_event *event) |
| 1090 | { | 1135 | { |
| 1091 | struct stack_entry *field; | 1136 | struct stack_entry *field; |
| 1092 | struct trace_seq *s = &iter->seq; | 1137 | struct trace_seq *s = &iter->seq; |
| @@ -1114,17 +1159,21 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter, | |||
| 1114 | return TRACE_TYPE_PARTIAL_LINE; | 1159 | return TRACE_TYPE_PARTIAL_LINE; |
| 1115 | } | 1160 | } |
| 1116 | 1161 | ||
| 1117 | static struct trace_event trace_stack_event = { | 1162 | static struct trace_event_functions trace_stack_funcs = { |
| 1118 | .type = TRACE_STACK, | ||
| 1119 | .trace = trace_stack_print, | 1163 | .trace = trace_stack_print, |
| 1120 | .raw = trace_special_print, | 1164 | .raw = trace_special_print, |
| 1121 | .hex = trace_special_hex, | 1165 | .hex = trace_special_hex, |
| 1122 | .binary = trace_special_bin, | 1166 | .binary = trace_special_bin, |
| 1123 | }; | 1167 | }; |
| 1124 | 1168 | ||
| 1169 | static struct trace_event trace_stack_event = { | ||
| 1170 | .type = TRACE_STACK, | ||
| 1171 | .funcs = &trace_stack_funcs, | ||
| 1172 | }; | ||
| 1173 | |||
| 1125 | /* TRACE_USER_STACK */ | 1174 | /* TRACE_USER_STACK */ |
| 1126 | static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, | 1175 | static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, |
| 1127 | int flags) | 1176 | int flags, struct trace_event *event) |
| 1128 | { | 1177 | { |
| 1129 | struct userstack_entry *field; | 1178 | struct userstack_entry *field; |
| 1130 | struct trace_seq *s = &iter->seq; | 1179 | struct trace_seq *s = &iter->seq; |
| @@ -1143,17 +1192,22 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, | |||
| 1143 | return TRACE_TYPE_PARTIAL_LINE; | 1192 | return TRACE_TYPE_PARTIAL_LINE; |
| 1144 | } | 1193 | } |
| 1145 | 1194 | ||
| 1146 | static struct trace_event trace_user_stack_event = { | 1195 | static struct trace_event_functions trace_user_stack_funcs = { |
| 1147 | .type = TRACE_USER_STACK, | ||
| 1148 | .trace = trace_user_stack_print, | 1196 | .trace = trace_user_stack_print, |
| 1149 | .raw = trace_special_print, | 1197 | .raw = trace_special_print, |
| 1150 | .hex = trace_special_hex, | 1198 | .hex = trace_special_hex, |
| 1151 | .binary = trace_special_bin, | 1199 | .binary = trace_special_bin, |
| 1152 | }; | 1200 | }; |
| 1153 | 1201 | ||
| 1202 | static struct trace_event trace_user_stack_event = { | ||
| 1203 | .type = TRACE_USER_STACK, | ||
| 1204 | .funcs = &trace_user_stack_funcs, | ||
| 1205 | }; | ||
| 1206 | |||
| 1154 | /* TRACE_BPRINT */ | 1207 | /* TRACE_BPRINT */ |
| 1155 | static enum print_line_t | 1208 | static enum print_line_t |
| 1156 | trace_bprint_print(struct trace_iterator *iter, int flags) | 1209 | trace_bprint_print(struct trace_iterator *iter, int flags, |
| 1210 | struct trace_event *event) | ||
| 1157 | { | 1211 | { |
| 1158 | struct trace_entry *entry = iter->ent; | 1212 | struct trace_entry *entry = iter->ent; |
| 1159 | struct trace_seq *s = &iter->seq; | 1213 | struct trace_seq *s = &iter->seq; |
| @@ -1178,7 +1232,8 @@ trace_bprint_print(struct trace_iterator *iter, int flags) | |||
| 1178 | 1232 | ||
| 1179 | 1233 | ||
| 1180 | static enum print_line_t | 1234 | static enum print_line_t |
| 1181 | trace_bprint_raw(struct trace_iterator *iter, int flags) | 1235 | trace_bprint_raw(struct trace_iterator *iter, int flags, |
| 1236 | struct trace_event *event) | ||
| 1182 | { | 1237 | { |
| 1183 | struct bprint_entry *field; | 1238 | struct bprint_entry *field; |
| 1184 | struct trace_seq *s = &iter->seq; | 1239 | struct trace_seq *s = &iter->seq; |
| @@ -1197,16 +1252,19 @@ trace_bprint_raw(struct trace_iterator *iter, int flags) | |||
| 1197 | return TRACE_TYPE_PARTIAL_LINE; | 1252 | return TRACE_TYPE_PARTIAL_LINE; |
| 1198 | } | 1253 | } |
| 1199 | 1254 | ||
| 1255 | static struct trace_event_functions trace_bprint_funcs = { | ||
| 1256 | .trace = trace_bprint_print, | ||
| 1257 | .raw = trace_bprint_raw, | ||
| 1258 | }; | ||
| 1200 | 1259 | ||
| 1201 | static struct trace_event trace_bprint_event = { | 1260 | static struct trace_event trace_bprint_event = { |
| 1202 | .type = TRACE_BPRINT, | 1261 | .type = TRACE_BPRINT, |
| 1203 | .trace = trace_bprint_print, | 1262 | .funcs = &trace_bprint_funcs, |
| 1204 | .raw = trace_bprint_raw, | ||
| 1205 | }; | 1263 | }; |
| 1206 | 1264 | ||
| 1207 | /* TRACE_PRINT */ | 1265 | /* TRACE_PRINT */ |
| 1208 | static enum print_line_t trace_print_print(struct trace_iterator *iter, | 1266 | static enum print_line_t trace_print_print(struct trace_iterator *iter, |
| 1209 | int flags) | 1267 | int flags, struct trace_event *event) |
| 1210 | { | 1268 | { |
| 1211 | struct print_entry *field; | 1269 | struct print_entry *field; |
| 1212 | struct trace_seq *s = &iter->seq; | 1270 | struct trace_seq *s = &iter->seq; |
| @@ -1225,7 +1283,8 @@ static enum print_line_t trace_print_print(struct trace_iterator *iter, | |||
| 1225 | return TRACE_TYPE_PARTIAL_LINE; | 1283 | return TRACE_TYPE_PARTIAL_LINE; |
| 1226 | } | 1284 | } |
| 1227 | 1285 | ||
| 1228 | static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags) | 1286 | static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags, |
| 1287 | struct trace_event *event) | ||
| 1229 | { | 1288 | { |
| 1230 | struct print_entry *field; | 1289 | struct print_entry *field; |
| 1231 | 1290 | ||
| @@ -1240,12 +1299,16 @@ static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags) | |||
| 1240 | return TRACE_TYPE_PARTIAL_LINE; | 1299 | return TRACE_TYPE_PARTIAL_LINE; |
| 1241 | } | 1300 | } |
| 1242 | 1301 | ||
| 1243 | static struct trace_event trace_print_event = { | 1302 | static struct trace_event_functions trace_print_funcs = { |
| 1244 | .type = TRACE_PRINT, | ||
| 1245 | .trace = trace_print_print, | 1303 | .trace = trace_print_print, |
| 1246 | .raw = trace_print_raw, | 1304 | .raw = trace_print_raw, |
| 1247 | }; | 1305 | }; |
| 1248 | 1306 | ||
| 1307 | static struct trace_event trace_print_event = { | ||
| 1308 | .type = TRACE_PRINT, | ||
| 1309 | .funcs = &trace_print_funcs, | ||
| 1310 | }; | ||
| 1311 | |||
| 1249 | 1312 | ||
| 1250 | static struct trace_event *events[] __initdata = { | 1313 | static struct trace_event *events[] __initdata = { |
| 1251 | &trace_fn_event, | 1314 | &trace_fn_event, |
