diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.c | 25 | ||||
-rw-r--r-- | kernel/trace/trace.h | 3 |
2 files changed, 27 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 639344a4d3a2..1a3d6b329782 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -287,6 +287,7 @@ static const char *trace_options[] = { | |||
287 | "annotate", | 287 | "annotate", |
288 | "userstacktrace", | 288 | "userstacktrace", |
289 | "sym-userobj", | 289 | "sym-userobj", |
290 | "printk-msg-only", | ||
290 | NULL | 291 | NULL |
291 | }; | 292 | }; |
292 | 293 | ||
@@ -2265,6 +2266,25 @@ static enum print_line_t print_hex_fmt(struct trace_iterator *iter) | |||
2265 | return TRACE_TYPE_HANDLED; | 2266 | return TRACE_TYPE_HANDLED; |
2266 | } | 2267 | } |
2267 | 2268 | ||
2269 | static enum print_line_t print_printk_msg_only(struct trace_iterator *iter) | ||
2270 | { | ||
2271 | struct trace_seq *s = &iter->seq; | ||
2272 | struct trace_entry *entry = iter->ent; | ||
2273 | struct print_entry *field; | ||
2274 | int ret; | ||
2275 | |||
2276 | trace_assign_type(field, entry); | ||
2277 | |||
2278 | ret = trace_seq_printf(s, field->buf); | ||
2279 | if (!ret) | ||
2280 | return TRACE_TYPE_PARTIAL_LINE; | ||
2281 | |||
2282 | if (entry->flags & TRACE_FLAG_CONT) | ||
2283 | trace_seq_print_cont(s, iter); | ||
2284 | |||
2285 | return TRACE_TYPE_HANDLED; | ||
2286 | } | ||
2287 | |||
2268 | static enum print_line_t print_bin_fmt(struct trace_iterator *iter) | 2288 | static enum print_line_t print_bin_fmt(struct trace_iterator *iter) |
2269 | { | 2289 | { |
2270 | struct trace_seq *s = &iter->seq; | 2290 | struct trace_seq *s = &iter->seq; |
@@ -2345,6 +2365,11 @@ static enum print_line_t print_trace_line(struct trace_iterator *iter) | |||
2345 | return ret; | 2365 | return ret; |
2346 | } | 2366 | } |
2347 | 2367 | ||
2368 | if (iter->ent->type == TRACE_PRINT && | ||
2369 | trace_flags & TRACE_ITER_PRINTK && | ||
2370 | trace_flags & TRACE_ITER_PRINTK_MSGONLY) | ||
2371 | return print_printk_msg_only(iter); | ||
2372 | |||
2348 | if (trace_flags & TRACE_ITER_BIN) | 2373 | if (trace_flags & TRACE_ITER_BIN) |
2349 | return print_bin_fmt(iter); | 2374 | return print_bin_fmt(iter); |
2350 | 2375 | ||
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index f07c246dd73d..fc75dce7a664 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -578,7 +578,8 @@ enum trace_iterator_flags { | |||
578 | TRACE_ITER_BRANCH = 0x1000, | 578 | TRACE_ITER_BRANCH = 0x1000, |
579 | TRACE_ITER_ANNOTATE = 0x2000, | 579 | TRACE_ITER_ANNOTATE = 0x2000, |
580 | TRACE_ITER_USERSTACKTRACE = 0x4000, | 580 | TRACE_ITER_USERSTACKTRACE = 0x4000, |
581 | TRACE_ITER_SYM_USEROBJ = 0x8000 | 581 | TRACE_ITER_SYM_USEROBJ = 0x8000, |
582 | TRACE_ITER_PRINTK_MSGONLY = 0x10000 | ||
582 | }; | 583 | }; |
583 | 584 | ||
584 | /* | 585 | /* |