]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/trace/trace_export.c
Merge commit 'tracing/core' into tracing/kprobes
[mv-sheeva.git] / kernel / trace / trace_export.c
index df1bf6e48bb9dc88b5c4704fec2aac8c95f8fa78..a79ef6f193c0460908ccc7526c18e9f500206cd2 100644 (file)
@@ -42,9 +42,9 @@ extern void __bad_type_size(void);
        if (!ret)                                                       \
                return 0;
 
-#undef TRACE_FIELD_ZERO_CHAR
-#define TRACE_FIELD_ZERO_CHAR(item)                                    \
-       ret = trace_seq_printf(s, "\tfield:char " #item ";\t"           \
+#undef TRACE_FIELD_ZERO
+#define TRACE_FIELD_ZERO(type, item)                                   \
+       ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t"      \
                               "offset:%u;\tsize:0;\n",                 \
                               (unsigned int)offsetof(typeof(field), item)); \
        if (!ret)                                                       \
@@ -92,9 +92,6 @@ ftrace_format_##call(struct ftrace_event_call *unused,                        \
 
 #include "trace_event_types.h"
 
-#undef TRACE_ZERO_CHAR
-#define TRACE_ZERO_CHAR(arg)
-
 #undef TRACE_FIELD
 #define TRACE_FIELD(type, item, assign)\
        entry->item = assign;
@@ -107,6 +104,9 @@ ftrace_format_##call(struct ftrace_event_call *unused,                      \
 #define TRACE_FIELD_SIGN(type, item, assign, is_signed)        \
        TRACE_FIELD(type, item, assign)
 
+#undef TRACE_FIELD_ZERO
+#define TRACE_FIELD_ZERO(type, item)
+
 #undef TP_CMD
 #define TP_CMD(cmd...) cmd
 
@@ -117,10 +117,16 @@ ftrace_format_##call(struct ftrace_event_call *unused,                    \
 #define TRACE_FIELD_SPECIAL(type_item, item, len, cmd) \
        cmd;
 
+static int ftrace_raw_init_event(struct ftrace_event_call *event_call)
+{
+       INIT_LIST_HEAD(&event_call->fields);
+
+       return 0;
+}
+
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \
 int ftrace_define_fields_##call(struct ftrace_event_call *event_call); \
-static int ftrace_raw_init_event_##call(void);                         \
                                                                        \
 struct ftrace_event_call __used                                                \
 __attribute__((__aligned__(4)))                                                \
@@ -128,15 +134,10 @@ __attribute__((section("_ftrace_events"))) event_##call = {               \
        .name                   = #call,                                \
        .id                     = proto,                                \
        .system                 = __stringify(TRACE_SYSTEM),            \
-       .raw_init               = ftrace_raw_init_event_##call,         \
+       .raw_init               = ftrace_raw_init_event,                \
        .show_format            = ftrace_format_##call,                 \
        .define_fields          = ftrace_define_fields_##call,          \
 };                                                                     \
-static int ftrace_raw_init_event_##call(void)                          \
-{                                                                      \
-       INIT_LIST_HEAD(&event_##call.fields);                           \
-       return 0;                                                       \
-}                                                                      \
 
 #undef TRACE_EVENT_FORMAT_NOFILTER
 #define TRACE_EVENT_FORMAT_NOFILTER(call, proto, args, fmt, tstruct,   \
@@ -179,8 +180,8 @@ __attribute__((section("_ftrace_events"))) event_##call = {         \
        if (ret)                                                        \
                return ret;
 
-#undef TRACE_FIELD_ZERO_CHAR
-#define TRACE_FIELD_ZERO_CHAR(item)
+#undef TRACE_FIELD_ZERO
+#define TRACE_FIELD_ZERO(type, item)
 
 #undef TRACE_EVENT_FORMAT
 #define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt)     \