summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_export.c
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-03-31 00:49:16 -0500
committerIngo Molnar <mingo@elte.hu>2009-04-14 00:00:51 +0200
commite45f2e2bd298e1ff687448e5fd15a3588b5807ec (patch)
tree353f132d53ecb3e991cf59c3d43a7664cb87b743 /kernel/trace/trace_export.c
parente1112b4d96859367a93468027c9635e2ac04eb3f (diff)
downloadop-kernel-dev-e45f2e2bd298e1ff687448e5fd15a3588b5807ec.zip
op-kernel-dev-e45f2e2bd298e1ff687448e5fd15a3588b5807ec.tar.gz
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 f4e4661..77c494f 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -65,6 +65,22 @@ ftrace_format_##call(struct trace_seq *s) \
return ret; \
}
+#undef TRACE_EVENT_FORMAT_NOFILTER
+#define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \
+ tpfmt) \
+static int \
+ftrace_format_##call(struct trace_seq *s) \
+{ \
+ struct args field; \
+ int ret; \
+ \
+ tstruct; \
+ \
+ trace_seq_printf(s, "\nprint fmt: \"%s\"\n", tpfmt); \
+ \
+ return ret; \
+}
+
#include "trace_event_types.h"
#undef TRACE_ZERO_CHAR
@@ -109,6 +125,19 @@ static int ftrace_raw_init_event_##call(void) \
return 0; \
} \
+#undef TRACE_EVENT_FORMAT_NOFILTER
+#define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \
+ tpfmt) \
+ \
+struct ftrace_event_call __used \
+__attribute__((__aligned__(4))) \
+__attribute__((section("_ftrace_events"))) event_##call = { \
+ .name = #call, \
+ .id = proto, \
+ .system = __stringify(TRACE_SYSTEM), \
+ .show_format = ftrace_format_##call, \
+};
+
#include "trace_event_types.h"
#undef TRACE_FIELD
@@ -150,4 +179,8 @@ ftrace_define_fields_##call(void) \
return ret; \
}
+#undef TRACE_EVENT_FORMAT_NOFILTER
+#define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct, \
+ tpfmt)
+
#include "trace_event_types.h"
OpenPOWER on IntegriCloud