Skip to content

Commit

Permalink
tracing: fix transposed numbers of lock_depth and preempt_count
Browse files Browse the repository at this point in the history
The lock_depth and preempt_count numbers in the latency format is
transposed.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Oct 7, 2009
1 parent b0f56f1 commit 829b876
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions kernel/trace/trace_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,16 +486,18 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
hardirq ? 'h' : softirq ? 's' : '.'))
return 0;

if (entry->lock_depth < 0)
ret = trace_seq_putc(s, '.');
if (entry->preempt_count)
ret = trace_seq_printf(s, "%x", entry->preempt_count);
else
ret = trace_seq_printf(s, "%d", entry->lock_depth);
ret = trace_seq_putc(s, '.');

if (!ret)
return 0;

if (entry->preempt_count)
return trace_seq_printf(s, "%x", entry->preempt_count);
return trace_seq_putc(s, '.');
if (entry->lock_depth < 0)
return trace_seq_putc(s, '.');

return trace_seq_printf(s, "%d", entry->lock_depth);
}

static int
Expand Down

0 comments on commit 829b876

Please sign in to comment.