diff options
| -rw-r--r-- | kernel/trace/trace.c | 2 | ||||
| -rw-r--r-- | kernel/trace/trace.h | 2 | ||||
| -rw-r--r-- | kernel/trace/trace_event_types.h | 2 | ||||
| -rw-r--r-- | kernel/trace/trace_export.c | 33 |
4 files changed, 36 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 962e6179994a..c209d214169c 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -1064,7 +1064,6 @@ ftrace_trace_special(void *__tr, | |||
| 1064 | unsigned long arg1, unsigned long arg2, unsigned long arg3, | 1064 | unsigned long arg1, unsigned long arg2, unsigned long arg3, |
| 1065 | int pc) | 1065 | int pc) |
| 1066 | { | 1066 | { |
| 1067 | struct ftrace_event_call *call = &event_special; | ||
| 1068 | struct ring_buffer_event *event; | 1067 | struct ring_buffer_event *event; |
| 1069 | struct trace_array *tr = __tr; | 1068 | struct trace_array *tr = __tr; |
| 1070 | struct special_entry *entry; | 1069 | struct special_entry *entry; |
| @@ -1077,7 +1076,6 @@ ftrace_trace_special(void *__tr, | |||
| 1077 | entry->arg1 = arg1; | 1076 | entry->arg1 = arg1; |
| 1078 | entry->arg2 = arg2; | 1077 | entry->arg2 = arg2; |
| 1079 | entry->arg3 = arg3; | 1078 | entry->arg3 = arg3; |
| 1080 | filter_check_discard(call, entry, event); | ||
| 1081 | trace_buffer_unlock_commit(tr, event, 0, pc); | 1079 | trace_buffer_unlock_commit(tr, event, 0, pc); |
| 1082 | } | 1080 | } |
| 1083 | 1081 | ||
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index e7737281953f..3cf856fa597b 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -915,6 +915,8 @@ do { \ | |||
| 915 | #undef TRACE_EVENT_FORMAT | 915 | #undef TRACE_EVENT_FORMAT |
| 916 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ | 916 | #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ |
| 917 | extern struct ftrace_event_call event_##call; | 917 | extern struct ftrace_event_call event_##call; |
| 918 | #undef TRACE_EVENT_FORMAT_NOFILTER | ||
| 919 | #define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, tpfmt) | ||
| 918 | #include "trace_event_types.h" | 920 | #include "trace_event_types.h" |
| 919 | 921 | ||
| 920 | #endif /* _LINUX_KERNEL_TRACE_H */ | 922 | #endif /* _LINUX_KERNEL_TRACE_H */ |
diff --git a/kernel/trace/trace_event_types.h b/kernel/trace/trace_event_types.h index 95b147aac229..cfcecc4fd86d 100644 --- a/kernel/trace/trace_event_types.h +++ b/kernel/trace/trace_event_types.h | |||
| @@ -57,7 +57,7 @@ TRACE_EVENT_FORMAT(context_switch, TRACE_CTX, ctx_switch_entry, ignore, | |||
| 57 | TP_RAW_FMT("%u:%u:%u ==+ %u:%u:%u [%03u]") | 57 | TP_RAW_FMT("%u:%u:%u ==+ %u:%u:%u [%03u]") |
| 58 | ); | 58 | ); |
| 59 | 59 | ||
| 60 | TRACE_EVENT_FORMAT(special, TRACE_SPECIAL, special_entry, ignore, | 60 | TRACE_EVENT_FORMAT_NOFILTER(special, TRACE_SPECIAL, special_entry, ignore, |
| 61 | TRACE_STRUCT( | 61 | TRACE_STRUCT( |
| 62 | TRACE_FIELD(unsigned long, arg1, arg1) | 62 | TRACE_FIELD(unsigned long, arg1, arg1) |
| 63 | TRACE_FIELD(unsigned long, arg2, arg2) | 63 | TRACE_FIELD(unsigned long, arg2, arg2) |
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index f4e46616c48e..77c494f5e1d6 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
| @@ -65,6 +65,22 @@ ftrace_format_##call(struct trace_seq *s) \ | |||
| 65 | return ret; \ | 65 | return ret; \ |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | #undef TRACE_EVENT_FORMAT_NOFILTER | ||
| 69 | #define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \ | ||
| 70 | tpfmt) \ | ||
| 71 | static int \ | ||
| 72 | ftrace_format_##call(struct trace_seq *s) \ | ||
| 73 | { \ | ||
| 74 | struct args field; \ | ||
| 75 | int ret; \ | ||
| 76 | \ | ||
| 77 | tstruct; \ | ||
| 78 | \ | ||
| 79 | trace_seq_printf(s, "\nprint fmt: \"%s\"\n", tpfmt); \ | ||
| 80 | \ | ||
| 81 | return ret; \ | ||
| 82 | } | ||
| 83 | |||
| 68 | #include "trace_event_types.h" | 84 | #include "trace_event_types.h" |
| 69 | 85 | ||
| 70 | #undef TRACE_ZERO_CHAR | 86 | #undef TRACE_ZERO_CHAR |
| @@ -109,6 +125,19 @@ static int ftrace_raw_init_event_##call(void) \ | |||
| 109 | return 0; \ | 125 | return 0; \ |
| 110 | } \ | 126 | } \ |
| 111 | 127 | ||
| 128 | #undef TRACE_EVENT_FORMAT_NOFILTER | ||
| 129 | #define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \ | ||
| 130 | tpfmt) \ | ||
| 131 | \ | ||
| 132 | struct ftrace_event_call __used \ | ||
| 133 | __attribute__((__aligned__(4))) \ | ||
| 134 | __attribute__((section("_ftrace_events"))) event_##call = { \ | ||
| 135 | .name = #call, \ | ||
| 136 | .id = proto, \ | ||
| 137 | .system = __stringify(TRACE_SYSTEM), \ | ||
| 138 | .show_format = ftrace_format_##call, \ | ||
| 139 | }; | ||
| 140 | |||
| 112 | #include "trace_event_types.h" | 141 | #include "trace_event_types.h" |
| 113 | 142 | ||
| 114 | #undef TRACE_FIELD | 143 | #undef TRACE_FIELD |
| @@ -150,4 +179,8 @@ ftrace_define_fields_##call(void) \ | |||
| 150 | return ret; \ | 179 | return ret; \ |
| 151 | } | 180 | } |
| 152 | 181 | ||
| 182 | #undef TRACE_EVENT_FORMAT_NOFILTER | ||
| 183 | #define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \ | ||
| 184 | tpfmt) | ||
| 185 | |||
| 153 | #include "trace_event_types.h" | 186 | #include "trace_event_types.h" |
