diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index f572f44c6e1e..ed17565826b0 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -486,16 +486,18 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) | |||
486 | hardirq ? 'h' : softirq ? 's' : '.')) | 486 | hardirq ? 'h' : softirq ? 's' : '.')) |
487 | return 0; | 487 | return 0; |
488 | 488 | ||
489 | if (entry->lock_depth < 0) | 489 | if (entry->preempt_count) |
490 | ret = trace_seq_putc(s, '.'); | 490 | ret = trace_seq_printf(s, "%x", entry->preempt_count); |
491 | else | 491 | else |
492 | ret = trace_seq_printf(s, "%d", entry->lock_depth); | 492 | ret = trace_seq_putc(s, '.'); |
493 | |||
493 | if (!ret) | 494 | if (!ret) |
494 | return 0; | 495 | return 0; |
495 | 496 | ||
496 | if (entry->preempt_count) | 497 | if (entry->lock_depth < 0) |
497 | return trace_seq_printf(s, "%x", entry->preempt_count); | 498 | return trace_seq_putc(s, '.'); |
498 | return trace_seq_putc(s, '.'); | 499 | |
500 | return trace_seq_printf(s, "%d", entry->lock_depth); | ||
499 | } | 501 | } |
500 | 502 | ||
501 | static int | 503 | static int |
@@ -883,7 +885,7 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S) | |||
883 | trace_assign_type(field, iter->ent); | 885 | trace_assign_type(field, iter->ent); |
884 | 886 | ||
885 | if (!S) | 887 | if (!S) |
886 | task_state_char(field->prev_state); | 888 | S = task_state_char(field->prev_state); |
887 | T = task_state_char(field->next_state); | 889 | T = task_state_char(field->next_state); |
888 | if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n", | 890 | if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n", |
889 | field->prev_pid, | 891 | field->prev_pid, |
@@ -918,7 +920,7 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S) | |||
918 | trace_assign_type(field, iter->ent); | 920 | trace_assign_type(field, iter->ent); |
919 | 921 | ||
920 | if (!S) | 922 | if (!S) |
921 | task_state_char(field->prev_state); | 923 | S = task_state_char(field->prev_state); |
922 | T = task_state_char(field->next_state); | 924 | T = task_state_char(field->next_state); |
923 | 925 | ||
924 | SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid); | 926 | SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid); |