aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/trace_events_stage_1.h6
-rw-r--r--kernel/trace/trace_events_stage_2.h9
-rw-r--r--kernel/trace/trace_events_stage_3.h8
3 files changed, 12 insertions, 11 deletions
diff --git a/kernel/trace/trace_events_stage_1.h b/kernel/trace/trace_events_stage_1.h
index 82f68443c556..38985f9b379c 100644
--- a/kernel/trace/trace_events_stage_1.h
+++ b/kernel/trace/trace_events_stage_1.h
@@ -6,11 +6,13 @@
6 * struct ftrace_raw_<call> { 6 * struct ftrace_raw_<call> {
7 * struct trace_entry ent; 7 * struct trace_entry ent;
8 * <type> <item>; 8 * <type> <item>;
9 * <type2> <item2>[<len>];
9 * [...] 10 * [...]
10 * }; 11 * };
11 * 12 *
12 * The <type> <item> is created by the TRACE_FIELD(type, item, assign) 13 * The <type> <item> is created by the __field(type, item) macro or
13 * macro. We simply do "type item;", and that will create the fields 14 * the __array(type2, item2, len) macro.
15 * We simply do "type item;", and that will create the fields
14 * in the structure. 16 * in the structure.
15 */ 17 */
16 18
diff --git a/kernel/trace/trace_events_stage_2.h b/kernel/trace/trace_events_stage_2.h
index 1ad9f8d2fe45..ca347afd6aa0 100644
--- a/kernel/trace/trace_events_stage_2.h
+++ b/kernel/trace/trace_events_stage_2.h
@@ -20,7 +20,7 @@
20 * 20 *
21 * field = (typeof(field))entry; 21 * field = (typeof(field))entry;
22 * 22 *
23 * ret = trace_seq_printf(s, <TP_RAW_FMT> "%s", <ARGS> "\n"); 23 * ret = trace_seq_printf(s, <TP_printk> "\n");
24 * if (!ret) 24 * if (!ret)
25 * return TRACE_TYPE_PARTIAL_LINE; 25 * return TRACE_TYPE_PARTIAL_LINE;
26 * 26 *
@@ -76,10 +76,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
76 * int ret; 76 * int ret;
77 * 77 *
78 * ret = trace_seq_printf(s, #type " " #item ";" 78 * ret = trace_seq_printf(s, #type " " #item ";"
79 * " size:%d; offset:%d;\n", 79 * " offset:%u; size:%u;\n",
80 * sizeof(field.type), 80 * offsetof(struct ftrace_raw_##call, item),
81 * offsetof(struct ftrace_raw_##call, 81 * sizeof(field.type));
82 * item));
83 * 82 *
84 * } 83 * }
85 */ 84 */
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h
index d6de06b9201a..6ee1de59f19d 100644
--- a/kernel/trace/trace_events_stage_3.h
+++ b/kernel/trace/trace_events_stage_3.h
@@ -56,7 +56,8 @@
56 * return; 56 * return;
57 * entry = ring_buffer_event_data(event); 57 * entry = ring_buffer_event_data(event);
58 * 58 *
59 * <tstruct>; <-- Here we assign the entries by the TRACE_FIELD. 59 * <assign>; <-- Here we assign the entries by the __field and
60 * __array macros.
60 * 61 *
61 * trace_current_buffer_unlock_commit(event, irq_flags, pc); 62 * trace_current_buffer_unlock_commit(event, irq_flags, pc);
62 * } 63 * }
@@ -96,11 +97,10 @@
96 * __attribute__((__aligned__(4))) 97 * __attribute__((__aligned__(4)))
97 * __attribute__((section("_ftrace_events"))) event_<call> = { 98 * __attribute__((section("_ftrace_events"))) event_<call> = {
98 * .name = "<call>", 99 * .name = "<call>",
100 * .system = "<system>",
101 * .raw_init = ftrace_raw_init_event_<call>,
99 * .regfunc = ftrace_reg_event_<call>, 102 * .regfunc = ftrace_reg_event_<call>,
100 * .unregfunc = ftrace_unreg_event_<call>, 103 * .unregfunc = ftrace_unreg_event_<call>,
101 * .raw_init = ftrace_raw_init_event_<call>,
102 * .raw_reg = ftrace_raw_reg_event_<call>,
103 * .raw_unreg = ftrace_raw_unreg_event_<call>,
104 * .show_format = ftrace_format_<call>, 104 * .show_format = ftrace_format_<call>,
105 * } 105 * }
106 * 106 *