Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146021
b: refs/heads/master
c: f3948f8
h: refs/heads/master
i:
  146019: 7f604ea
v: v3
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 16, 2009
1 parent faebd3e commit bfde27c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: 1d54ad6da9192fed5dd3b60224d9f2dfea0dcd82
refs/heads/master: f3948f8857ef5de239f28a61dddb1554a0ae4c2c
18 changes: 13 additions & 5 deletions trunk/kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ static void blk_tracer_print_header(struct seq_file *m)
static void blk_tracer_start(struct trace_array *tr)
{
blk_tracer_enabled = true;
trace_flags &= ~TRACE_ITER_CONTEXT_INFO;
}

static int blk_tracer_init(struct trace_array *tr)
Expand All @@ -1224,7 +1223,6 @@ static int blk_tracer_init(struct trace_array *tr)
static void blk_tracer_stop(struct trace_array *tr)
{
blk_tracer_enabled = false;
trace_flags |= TRACE_ITER_CONTEXT_INFO;
}

static void blk_tracer_reset(struct trace_array *tr)
Expand Down Expand Up @@ -1289,9 +1287,6 @@ static enum print_line_t print_one_line(struct trace_iterator *iter,
static enum print_line_t blk_trace_event_print(struct trace_iterator *iter,
int flags)
{
if (!trace_print_context(iter))
return TRACE_TYPE_PARTIAL_LINE;

return print_one_line(iter, false);
}

Expand Down Expand Up @@ -1326,6 +1321,18 @@ static enum print_line_t blk_tracer_print_line(struct trace_iterator *iter)
return print_one_line(iter, true);
}

static int blk_tracer_set_flag(u32 old_flags, u32 bit, int set)
{
/* don't output context-info for blk_classic output */
if (bit == TRACE_BLK_OPT_CLASSIC) {
if (set)
trace_flags &= ~TRACE_ITER_CONTEXT_INFO;
else
trace_flags |= TRACE_ITER_CONTEXT_INFO;
}
return 0;
}

static struct tracer blk_tracer __read_mostly = {
.name = "blk",
.init = blk_tracer_init,
Expand All @@ -1335,6 +1342,7 @@ static struct tracer blk_tracer __read_mostly = {
.print_header = blk_tracer_print_header,
.print_line = blk_tracer_print_line,
.flags = &blk_tracer_flags,
.set_flag = blk_tracer_set_flag,
};

static struct trace_event trace_blk_event = {
Expand Down

0 comments on commit bfde27c

Please sign in to comment.