Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116612
b: refs/heads/master
c: 80b5e94
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 14, 2008
1 parent 92ab7ee commit b63d7a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 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: f09ce573f57ddc35c67b39e51f34545877b30031
refs/heads/master: 80b5e940050c273ba277acbf3a9fbc1d4441e681
12 changes: 9 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
entry->field.ctx.next_pid = next->pid;
entry->field.ctx.next_prio = next->prio;
entry->field.ctx.next_state = next->state;
entry->field.ctx.next_cpu = task_cpu(next);
__trace_stack(tr, data, flags, 5);
__raw_spin_unlock(&data->lock);
raw_local_irq_restore(irq_flags);
Expand All @@ -1003,6 +1004,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
entry->field.ctx.next_pid = wakee->pid;
entry->field.ctx.next_prio = wakee->prio;
entry->field.ctx.next_state = wakee->state;
entry->field.ctx.next_cpu = task_cpu(wakee);
__trace_stack(tr, data, flags, 6);
__raw_spin_unlock(&data->lock);
raw_local_irq_restore(irq_flags);
Expand Down Expand Up @@ -1636,10 +1638,11 @@ print_lat_fmt(struct trace_iterator *iter, unsigned int trace_idx, int cpu)
__ffs(field->ctx.prev_state) + 1 : 0;
S = state < sizeof(state_to_char) - 1 ? state_to_char[state] : 'X';
comm = trace_find_cmdline(field->ctx.next_pid);
trace_seq_printf(s, " %5d:%3d:%c %s %5d:%3d:%c %s\n",
trace_seq_printf(s, " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
field->ctx.prev_pid,
field->ctx.prev_prio,
S, entry->type == TRACE_CTX ? "==>" : " +",
field->ctx.next_cpu,
field->ctx.next_pid,
field->ctx.next_prio,
T, comm);
Expand Down Expand Up @@ -1736,11 +1739,12 @@ static int print_trace_fmt(struct trace_iterator *iter)
state_to_char[field->ctx.prev_state] : 'X';
T = field->ctx.next_state < sizeof(state_to_char) ?
state_to_char[field->ctx.next_state] : 'X';
ret = trace_seq_printf(s, " %5d:%3d:%c %s %5d:%3d:%c\n",
ret = trace_seq_printf(s, " %5d:%3d:%c %s [%03d] %5d:%3d:%c\n",
field->ctx.prev_pid,
field->ctx.prev_prio,
S,
entry->type == TRACE_CTX ? "==>" : " +",
field->ctx.next_cpu,
field->ctx.next_pid,
field->ctx.next_prio,
T);
Expand Down Expand Up @@ -1817,10 +1821,11 @@ static int print_raw_fmt(struct trace_iterator *iter)
state_to_char[field->ctx.next_state] : 'X';
if (entry->type == TRACE_WAKE)
S = '+';
ret = trace_seq_printf(s, "%d %d %c %d %d %c\n",
ret = trace_seq_printf(s, "%d %d %c %d %d %d %c\n",
field->ctx.prev_pid,
field->ctx.prev_prio,
S,
field->ctx.next_cpu,
field->ctx.next_pid,
field->ctx.next_prio,
T);
Expand Down Expand Up @@ -1893,6 +1898,7 @@ static int print_hex_fmt(struct trace_iterator *iter)
SEQ_PUT_HEX_FIELD_RET(s, field->ctx.prev_pid);
SEQ_PUT_HEX_FIELD_RET(s, field->ctx.prev_prio);
SEQ_PUT_HEX_FIELD_RET(s, S);
SEQ_PUT_HEX_FIELD_RET(s, field->ctx.next_cpu);
SEQ_PUT_HEX_FIELD_RET(s, field->ctx.next_pid);
SEQ_PUT_HEX_FIELD_RET(s, field->ctx.next_prio);
SEQ_PUT_HEX_FIELD_RET(s, T);
Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct ctx_switch_entry {
unsigned int next_pid;
unsigned char next_prio;
unsigned char next_state;
unsigned int next_cpu;
};

/*
Expand Down

0 comments on commit b63d7a3

Please sign in to comment.