sched_switchの出力フォーマットに関するメモ

2013/03/10 Linux::kernel

sched_switchの出力フォーマットに関するメモ

ステータス表示

"RMSDTtZXxKW"
char status
Rrunning
Mrunning-mutex
Ssleeping
Ddisk sleep
Tstopped
ttracing stop
Zzombie
Xdead
xdead
Kwakekill
Wwaking

FILE: linux-2.6/kernel/trace/trace_output.c
/* TRACE_CTX an TRACE_WAKE */
static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter,
                         char *delim)

    T = task_state_char(field->next_state);
    S = task_state_char(field->prev_state);
    trace_find_cmdline(field->next_pid, comm);
    if (!trace_seq_printf(&iter->seq,
                  " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
                  field->prev_pid,
                  field->prev_prio,
                  S, delim,
                  field->next_cpu,
                  field->next_pid,
                  field->next_prio,
                  T, comm))
        return TRACE_TYPE_PARTIAL_LINE;


static enum print_line_t trace_ctx_print(struct trace_iterator *iter, int flags)
{
    return trace_ctxwake_print(iter, "==>");
}

static enum print_line_t trace_wake_print(struct trace_iterator *iter,
                      int flags)
{
    return trace_ctxwake_print(iter, "  +");
}
OK キャンセル 確認 その他