aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_export.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_export.c')
-rw-r--r--kernel/trace/trace_export.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 0fb7be73e31c..23ae78430d58 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -15,19 +15,40 @@
15 15
16#include "trace_output.h" 16#include "trace_output.h"
17 17
18#include "trace_format.h" 18
19#undef TRACE_STRUCT
20#define TRACE_STRUCT(args...) args
21
22#undef TRACE_FIELD
23#define TRACE_FIELD(type, item, assign) \
24 ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
25 "offset:%u;\tsize:%u;\n", \
26 (unsigned int)offsetof(typeof(field), item), \
27 (unsigned int)sizeof(field.item)); \
28 if (!ret) \
29 return 0;
30
31
32#undef TRACE_FIELD_SPECIAL
33#define TRACE_FIELD_SPECIAL(type_item, item, cmd) \
34 ret = trace_seq_printf(s, "\tfield special:" #type_item ";\t" \
35 "offset:%u;\tsize:%u;\n", \
36 (unsigned int)offsetof(typeof(field), item), \
37 (unsigned int)sizeof(field.item)); \
38 if (!ret) \
39 return 0;
19 40
20#undef TRACE_FIELD_ZERO_CHAR 41#undef TRACE_FIELD_ZERO_CHAR
21#define TRACE_FIELD_ZERO_CHAR(item) \ 42#define TRACE_FIELD_ZERO_CHAR(item) \
22 ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \ 43 ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \
23 "offset:%lu;\tsize:0;\n", \ 44 "offset:%u;\tsize:0;\n", \
24 offsetof(typeof(field), item)); \ 45 (unsigned int)offsetof(typeof(field), item)); \
25 if (!ret) \ 46 if (!ret) \
26 return 0; 47 return 0;
27 48
28 49
29#undef TPRAWFMT 50#undef TP_RAW_FMT
30#define TPRAWFMT(args...) args 51#define TP_RAW_FMT(args...) args
31 52
32#undef TRACE_EVENT_FORMAT 53#undef TRACE_EVENT_FORMAT
33#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ 54#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \
@@ -57,8 +78,8 @@ ftrace_format_##call(struct trace_seq *s) \
57#define TRACE_FIELD(type, item, assign)\ 78#define TRACE_FIELD(type, item, assign)\
58 entry->item = assign; 79 entry->item = assign;
59 80
60#undef TPCMD 81#undef TP_CMD
61#define TPCMD(cmd...) cmd 82#define TP_CMD(cmd...) cmd
62 83
63#undef TRACE_ENTRY 84#undef TRACE_ENTRY
64#define TRACE_ENTRY entry 85#define TRACE_ENTRY entry