History

tracing: Update the stage 3 of trace event macro comment

Update the comment of the 3rd stage of trace event macro expansion code. Now there are 2 macros makes different trace_raw_output_<call>() functions. Link: https://lkml.kernel.org/r/160277371605.29307.8586817119278606720.stgit@devnote2

Masami Hiramatsu committed 6 years ago

Commit 1600cbc1 parent efbbdaa1 file · +20 −9Browse files

Unified · Split

include/trace/trace_events.h+20−9
@@ -231,9 +231,11 @@ TRACE_MAKE_SYSTEM_STR(); · 230 unmodified lines
231231 * {
232232 * struct trace_seq *s = &iter->seq;
233233 * struct trace_event_raw_<call> *field; <-- defined in stage 1
234− * struct trace_entry *entry;
235234 * struct trace_seq *p = &iter->tmp_seq;
236− * int ret;
235+ *
236+ * -------(for event)-------
237+ *
238+ * struct trace_entry *entry;
237239 *
238240 * entry = iter->ent;
239241 *
@@ -245,14 +247,23 @@ TRACE_MAKE_SYSTEM_STR(); · 5 unmodified lines
245247 * field = (typeof(field))entry;
246248 *
247249 * trace_seq_init(p);
248− * ret = trace_seq_printf(s, "%s: ", <call>);
249− * if (ret)
250− * ret = trace_seq_printf(s, <TP_printk> "\n");
251− * if (!ret)
252− * return TRACE_TYPE_PARTIAL_LINE;
250+ * return trace_output_call(iter, <call>, <TP_printk> "\n");
253251 *
254− * return TRACE_TYPE_HANDLED;
255− * }
252+ * ------(or, for event class)------
253+ *
254+ * int ret;
255+ *
256+ * field = (typeof(field))iter->ent;
257+ *
258+ * ret = trace_raw_output_prep(iter, trace_event);
259+ * if (ret != TRACE_TYPE_HANDLED)
260+ * return ret;
261+ *
262+ * trace_event_printf(iter, <TP_printk> "\n");
263+ *
264+ * return trace_handle_return(s);
265+ * -------
266+ * }
256267 *
257268 * This is the method used to print the raw event to the trace
258269 * output format. Note, this is not needed if the data is read

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t