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
Showing the changes to include/trace (1 of 1 file). Show all
Unified · Split
| @@ -231,9 +231,11 @@ TRACE_MAKE_SYSTEM_STR(); · 230 unmodified lines | |||
| 231 | * { | 231 | * { |
| 232 | * struct trace_seq *s = &iter->seq; | 232 | * struct trace_seq *s = &iter->seq; |
| 233 | * struct trace_event_raw_<call> *field; <-- defined in stage 1 | 233 | * struct trace_event_raw_<call> *field; <-- defined in stage 1 |
| 234 | * struct trace_entry *entry; | ||
| 235 | * struct trace_seq *p = &iter->tmp_seq; | 234 | * struct trace_seq *p = &iter->tmp_seq; |
| 236 | * int ret; | 235 | * |
| 236 | * -------(for event)------- | ||
| 237 | * | ||
| 238 | * struct trace_entry *entry; | ||
| 237 | * | 239 | * |
| 238 | * entry = iter->ent; | 240 | * entry = iter->ent; |
| 239 | * | 241 | * |
| @@ -245,14 +247,23 @@ TRACE_MAKE_SYSTEM_STR(); · 5 unmodified lines | |||
| 245 | * field = (typeof(field))entry; | 247 | * field = (typeof(field))entry; |
| 246 | * | 248 | * |
| 247 | * trace_seq_init(p); | 249 | * trace_seq_init(p); |
| 248 | * ret = trace_seq_printf(s, "%s: ", <call>); | 250 | * return trace_output_call(iter, <call>, <TP_printk> "\n"); |
| 249 | * if (ret) | ||
| 250 | * ret = trace_seq_printf(s, <TP_printk> "\n"); | ||
| 251 | * if (!ret) | ||
| 252 | * return TRACE_TYPE_PARTIAL_LINE; | ||
| 253 | * | 251 | * |
| 254 | * return TRACE_TYPE_HANDLED; | 252 | * ------(or, for event class)------ |
| 255 | * } | 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 | * } | ||
| 256 | * | 267 | * |
| 257 | * This is the method used to print the raw event to the trace | 268 | * This is the method used to print the raw event to the trace |
| 258 | * output format. Note, this is not needed if the data is read | 269 | * output format. Note, this is not needed if the data is read |