Commit 0e3d0f05 authored by Steven Rostedt's avatar Steven Rostedt

tracing: update comments to match event code macros

Impact: clean up / comments

The comments that described the ftrace macros to manipulate the
TRACE_EVENT and TRACE_FORMAT macros no longer match the code.
This patch updates them.
Reported-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent 823f9124
...@@ -6,11 +6,13 @@ ...@@ -6,11 +6,13 @@
* struct ftrace_raw_<call> { * struct ftrace_raw_<call> {
* struct trace_entry ent; * struct trace_entry ent;
* <type> <item>; * <type> <item>;
* <type2> <item2>[<len>];
* [...] * [...]
* }; * };
* *
* The <type> <item> is created by the TRACE_FIELD(type, item, assign) * The <type> <item> is created by the __field(type, item) macro or
* macro. We simply do "type item;", and that will create the fields * the __array(type2, item2, len) macro.
* We simply do "type item;", and that will create the fields
* in the structure. * in the structure.
*/ */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
* field = (typeof(field))entry; * field = (typeof(field))entry;
* *
* ret = trace_seq_printf(s, <TP_RAW_FMT> "%s", <ARGS> "\n"); * ret = trace_seq_printf(s, <TP_printk> "\n");
* if (!ret) * if (!ret)
* return TRACE_TYPE_PARTIAL_LINE; * return TRACE_TYPE_PARTIAL_LINE;
* *
...@@ -76,10 +76,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ ...@@ -76,10 +76,9 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
* int ret; * int ret;
* *
* ret = trace_seq_printf(s, #type " " #item ";" * ret = trace_seq_printf(s, #type " " #item ";"
* " size:%d; offset:%d;\n", * " offset:%u; size:%u;\n",
* sizeof(field.type), * offsetof(struct ftrace_raw_##call, item),
* offsetof(struct ftrace_raw_##call, * sizeof(field.type));
* item));
* *
* } * }
*/ */
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
* return; * return;
* entry = ring_buffer_event_data(event); * entry = ring_buffer_event_data(event);
* *
* <tstruct>; <-- Here we assign the entries by the TRACE_FIELD. * <assign>; <-- Here we assign the entries by the __field and
* __array macros.
* *
* trace_current_buffer_unlock_commit(event, irq_flags, pc); * trace_current_buffer_unlock_commit(event, irq_flags, pc);
* } * }
...@@ -96,11 +97,10 @@ ...@@ -96,11 +97,10 @@
* __attribute__((__aligned__(4))) * __attribute__((__aligned__(4)))
* __attribute__((section("_ftrace_events"))) event_<call> = { * __attribute__((section("_ftrace_events"))) event_<call> = {
* .name = "<call>", * .name = "<call>",
* .system = "<system>",
* .raw_init = ftrace_raw_init_event_<call>,
* .regfunc = ftrace_reg_event_<call>, * .regfunc = ftrace_reg_event_<call>,
* .unregfunc = ftrace_unreg_event_<call>, * .unregfunc = ftrace_unreg_event_<call>,
* .raw_init = ftrace_raw_init_event_<call>,
* .raw_reg = ftrace_raw_reg_event_<call>,
* .raw_unreg = ftrace_raw_unreg_event_<call>,
* .show_format = ftrace_format_<call>, * .show_format = ftrace_format_<call>,
* } * }
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment