Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121286
b: refs/heads/master
c: 66896a8
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Dec 16, 2008
1 parent 18ed566 commit e6f2046
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c2d7329d8afa9efa3ec24e19a53e7be9d14f242
refs/heads/master: 66896a85cf2890b6bbbc4c9ccdcd296600ffbf89
25 changes: 25 additions & 0 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ static const char *trace_options[] = {
"annotate",
"userstacktrace",
"sym-userobj",
"printk-msg-only",
NULL
};

Expand Down Expand Up @@ -2265,6 +2266,25 @@ static enum print_line_t print_hex_fmt(struct trace_iterator *iter)
return TRACE_TYPE_HANDLED;
}

static enum print_line_t print_printk_msg_only(struct trace_iterator *iter)
{
struct trace_seq *s = &iter->seq;
struct trace_entry *entry = iter->ent;
struct print_entry *field;
int ret;

trace_assign_type(field, entry);

ret = trace_seq_printf(s, field->buf);
if (!ret)
return TRACE_TYPE_PARTIAL_LINE;

if (entry->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);

return TRACE_TYPE_HANDLED;
}

static enum print_line_t print_bin_fmt(struct trace_iterator *iter)
{
struct trace_seq *s = &iter->seq;
Expand Down Expand Up @@ -2345,6 +2365,11 @@ static enum print_line_t print_trace_line(struct trace_iterator *iter)
return ret;
}

if (iter->ent->type == TRACE_PRINT &&
trace_flags & TRACE_ITER_PRINTK &&
trace_flags & TRACE_ITER_PRINTK_MSGONLY)
return print_printk_msg_only(iter);

if (trace_flags & TRACE_ITER_BIN)
return print_bin_fmt(iter);

Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ enum trace_iterator_flags {
TRACE_ITER_BRANCH = 0x1000,
TRACE_ITER_ANNOTATE = 0x2000,
TRACE_ITER_USERSTACKTRACE = 0x4000,
TRACE_ITER_SYM_USEROBJ = 0x8000
TRACE_ITER_SYM_USEROBJ = 0x8000,
TRACE_ITER_PRINTK_MSGONLY = 0x10000
};

/*
Expand Down

0 comments on commit e6f2046

Please sign in to comment.