aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_export.c
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-03-31 01:49:16 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-13 18:00:51 -0400
commite45f2e2bd298e1ff687448e5fd15a3588b5807ec (patch)
tree353f132d53ecb3e991cf59c3d43a7664cb87b743 /kernel/trace/trace_export.c
parente1112b4d96859367a93468027c9635e2ac04eb3f (diff)
tracing/filters: add TRACE_EVENT_FORMAT_NOFILTER event macro
Frederic Weisbecker suggested that the trace_special event shouldn't be filterable; this patch adds a TRACE_EVENT_FORMAT_NOFILTER event macro that allows an event format to be exported without having a filter attached, and removes filtering from the trace_special event. Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r--kernel/trace/trace_export.c33
1 files changed, 33 insertions, 0 deletions
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) \
71static int \
72ftrace_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 \
132struct 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"