Merge branches 'tracing/blktrace', 'tracing/ftrace', 'tracing/urgent' and 'linus...
authorIngo Molnar <mingo@elte.hu>
Wed, 4 Feb 2009 19:45:41 +0000 (20:45 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 4 Feb 2009 19:45:41 +0000 (20:45 +0100)
1  2  3 
kernel/trace/ftrace.c
kernel/trace/trace.c

Simple merge
index 152d0969adf813624302b32b7efe5348e864cb24,40edef4255c5956a7e9737f9a5a570dfdaf26f47,17bb88d86ac2fead9cb0bacc72a338c2d8d798c4..bbdfaa2cbdb951dedd8f8fefb74eb4f057baadf8
@@@@ -1352,6 -1378,57 -1704,103 +1379,6 @@@@ print_trace_header(struct seq_file *m, 
        seq_puts(m, "\n");
   }
   
 --static void
 --lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
 --{
 --     int hardirq, softirq;
 --     char *comm;
 --
 --     comm = trace_find_cmdline(entry->pid);
 --
 --     trace_seq_printf(s, "%8.8s-%-5d ", comm, entry->pid);
 --     trace_seq_printf(s, "%3d", cpu);
 --     trace_seq_printf(s, "%c%c",
 --                     (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' :
 --                      (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : '.',
 --                     ((entry->flags & TRACE_FLAG_NEED_RESCHED) ? 'N' : '.'));
 --
 --     hardirq = entry->flags & TRACE_FLAG_HARDIRQ;
 --     softirq = entry->flags & TRACE_FLAG_SOFTIRQ;
 --     if (hardirq && softirq) {
 --             trace_seq_putc(s, 'H');
 --     } else {
 --             if (hardirq) {
 --                     trace_seq_putc(s, 'h');
 --             } else {
 --                     if (softirq)
 --                             trace_seq_putc(s, 's');
 --                     else
 --                             trace_seq_putc(s, '.');
 --             }
 --     }
 --
 --     if (entry->preempt_count)
 --             trace_seq_printf(s, "%x", entry->preempt_count);
 --     else
 --             trace_seq_puts(s, ".");
 --}
 --
 --unsigned long preempt_mark_thresh = 100;
 --
 --static void
 --lat_print_timestamp(struct trace_seq *s, u64 abs_usecs,
 --                 unsigned long rel_usecs)
 --{
 --     trace_seq_printf(s, " %4lldus", abs_usecs);
 --     if (rel_usecs > preempt_mark_thresh)
 --             trace_seq_puts(s, "!: ");
 --     else if (rel_usecs > 1)
 --             trace_seq_puts(s, "+: ");
 --     else
 --             trace_seq_puts(s, " : ");
  -}
  -
  -static const char state_to_char[] = TASK_STATE_TO_CHAR_STR;
  -
  -static int task_state_char(unsigned long state)
  -{
  -     int bit = state ? __ffs(state) + 1 : 0;
  -
  -     return bit < sizeof(state_to_char) - 1 ? state_to_char[bit] : '?';
  -}
  -
  -/*
  - * The message is supposed to contain an ending newline.
  - * If the printing stops prematurely, try to add a newline of our own.
  - */
  -void trace_seq_print_cont(struct trace_seq *s, struct trace_iterator *iter)
  -{
  -     struct trace_entry *ent;
  -     struct trace_field_cont *cont;
  -     bool ok = true;
  -
  -     ent = peek_next_entry(iter, iter->cpu, NULL);
  -     if (!ent || ent->type != TRACE_CONT) {
  -             trace_seq_putc(s, '\n');
  -             return;
  -     }
  -
  -     do {
  -             cont = (struct trace_field_cont *)ent;
  -             if (ok)
  -                     ok = (trace_seq_printf(s, "%s", cont->buf) > 0);
  -
  -             ftrace_disable_cpu();
  -
  -             if (iter->buffer_iter[iter->cpu])
  -                     ring_buffer_read(iter->buffer_iter[iter->cpu], NULL);
  -             else
  -                     ring_buffer_consume(iter->tr->buffer, iter->cpu, NULL);
  -
  -             ftrace_enable_cpu();
  -
  -             ent = peek_next_entry(iter, iter->cpu, NULL);
  -     } while (ent && ent->type == TRACE_CONT);
  -
  -     if (!ok)
  -             trace_seq_putc(s, '\n');
 --}
 --
   static void test_cpu_buff_start(struct trace_iterator *iter)
   {
        struct trace_seq *s = &iter->seq;
@@@@ -1373,28 -1451,49 -1823,132 +1400,28 @@@@ static enum print_line_t print_lat_fmt(
   {
        struct trace_seq *s = &iter->seq;
        unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
 --     struct trace_entry *next_entry;
  -     unsigned long verbose = (trace_flags & TRACE_ITER_VERBOSE);
  +     struct trace_event *event;
 -      unsigned long verbose = (trace_flags & TRACE_ITER_VERBOSE);
        struct trace_entry *entry = iter->ent;
 --     unsigned long abs_usecs;
 --     unsigned long rel_usecs;
 --     u64 next_ts;
 --     char *comm;
  -     int S, T;
  -     int i;
  -
  -     if (entry->type == TRACE_CONT)
  -             return TRACE_TYPE_HANDLED;
  +     int ret;
   
        test_cpu_buff_start(iter);
   
 --     next_entry = find_next_entry(iter, NULL, &next_ts);
 --     if (!next_entry)
 --             next_ts = iter->ts;
 --     rel_usecs = ns2usecs(next_ts - iter->ts);
 --     abs_usecs = ns2usecs(iter->ts - iter->tr->time_start);
 --
 --     if (verbose) {
 --             comm = trace_find_cmdline(entry->pid);
 --             trace_seq_printf(s, "%16s %5d %3d %d %08x %08x [%08lx]"
 --                              " %ld.%03ldms (+%ld.%03ldms): ",
 --                              comm,
 --                              entry->pid, cpu, entry->flags,
 --                              entry->preempt_count, trace_idx,
 --                              ns2usecs(iter->ts),
 --                              abs_usecs/1000,
 --                              abs_usecs % 1000, rel_usecs/1000,
 --                              rel_usecs % 1000);
 --     } else {
 --             lat_print_generic(s, entry, cpu);
 --             lat_print_timestamp(s, abs_usecs, rel_usecs);
  -     }
  -     switch (entry->type) {
  -     case TRACE_FN: {
  -             struct ftrace_entry *field;
  -
  -             trace_assign_type(field, entry);
 ++     event = ftrace_find_event(entry->type);
 + 
  -             seq_print_ip_sym(s, field->ip, sym_flags);
  -             trace_seq_puts(s, " (");
  -             seq_print_ip_sym(s, field->parent_ip, sym_flags);
  -             trace_seq_puts(s, ")\n");
  -             break;
  -     }
  -     case TRACE_CTX:
  -     case TRACE_WAKE: {
  -             struct ctx_switch_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             T = task_state_char(field->next_state);
  -             S = task_state_char(field->prev_state);
  -             comm = trace_find_cmdline(field->next_pid);
  -             trace_seq_printf(s, " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
  -                              field->prev_pid,
  -                              field->prev_prio,
  -                              S, entry->type == TRACE_CTX ? "==>" : "  +",
  -                              field->next_cpu,
  -                              field->next_pid,
  -                              field->next_prio,
  -                              T, comm);
  -             break;
  -     }
  -     case TRACE_SPECIAL: {
  -             struct special_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             trace_seq_printf(s, "# %ld %ld %ld\n",
  -                              field->arg1,
  -                              field->arg2,
  -                              field->arg3);
  -             break;
  -     }
  -     case TRACE_STACK: {
  -             struct stack_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
  -                     if (i)
  -                             trace_seq_puts(s, " <= ");
  -                     seq_print_ip_sym(s, field->caller[i], sym_flags);
  -             }
  -             trace_seq_puts(s, "\n");
  -             break;
  -     }
  -     case TRACE_PRINT: {
  -             struct print_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             seq_print_ip_sym(s, field->ip, sym_flags);
  -             trace_seq_printf(s, ": %s", field->buf);
  -             if (entry->flags & TRACE_FLAG_CONT)
  -                     trace_seq_print_cont(s, iter);
  -             break;
 ++     if (trace_flags & TRACE_ITER_CONTEXT_INFO) {
 ++             ret = trace_print_lat_context(iter);
 ++             if (ret)
 ++                     return ret;
        }
  -     case TRACE_BRANCH: {
  -             struct trace_branch *field;
   
 -      event = ftrace_find_event(entry->type);
  -             trace_assign_type(field, entry);
  -
  -             trace_seq_printf(s, "[%s] %s:%s:%d\n",
  -                              field->correct ? "  ok  " : " MISS ",
  -                              field->func,
  -                              field->file,
  -                              field->line);
  -             break;
  +     if (event && event->latency_trace) {
 -              ret = event->latency_trace(s, entry, sym_flags);
 ++             ret = event->latency_trace(iter, sym_flags);
  +             if (ret)
  +                     return ret;
  +             return TRACE_TYPE_HANDLED;
        }
  -     case TRACE_USER_STACK: {
  -             struct userstack_entry *field;
   
  -             trace_assign_type(field, entry);
  -
  -             seq_print_userip_objs(field, s, sym_flags);
  -             trace_seq_putc(s, '\n');
  -             break;
  -     }
  -     default:
  -             trace_seq_printf(s, "Unknown type %d\n", entry->type);
  -     }
  +     trace_seq_printf(s, "Unknown type %d\n", entry->type);
        return TRACE_TYPE_HANDLED;
   }
   
@@@@ -1403,31 -1502,44 -1957,160 +1430,31 @@@@ static enum print_line_t print_trace_fm
        struct trace_seq *s = &iter->seq;
        unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
        struct trace_entry *entry;
  -     unsigned long usec_rem;
  -     unsigned long long t;
  -     unsigned long secs;
  -     char *comm;
  +     struct trace_event *event;
 -      unsigned long usec_rem;
 -      unsigned long long t;
 -      unsigned long secs;
 -      char *comm;
        int ret;
  -     int S, T;
  -     int i;
   
        entry = iter->ent;
   
  -     if (entry->type == TRACE_CONT)
  -             return TRACE_TYPE_HANDLED;
  -
        test_cpu_buff_start(iter);
   
 --     comm = trace_find_cmdline(iter->ent->pid);
 --
 --     t = ns2usecs(iter->ts);
 --     usec_rem = do_div(t, 1000000ULL);
 --     secs = (unsigned long)t;
  -
  -     ret = trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid);
  -     if (!ret)
  -             return TRACE_TYPE_PARTIAL_LINE;
  -     ret = trace_seq_printf(s, "[%03d] ", iter->cpu);
  -     if (!ret)
  -             return TRACE_TYPE_PARTIAL_LINE;
  -     ret = trace_seq_printf(s, "%5lu.%06lu: ", secs, usec_rem);
  -     if (!ret)
  -             return TRACE_TYPE_PARTIAL_LINE;
  -
  -     switch (entry->type) {
  -     case TRACE_FN: {
  -             struct ftrace_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             ret = seq_print_ip_sym(s, field->ip, sym_flags);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             if ((sym_flags & TRACE_ITER_PRINT_PARENT) &&
  -                                             field->parent_ip) {
  -                     ret = trace_seq_printf(s, " <-");
  -                     if (!ret)
  -                             return TRACE_TYPE_PARTIAL_LINE;
  -                     ret = seq_print_ip_sym(s,
  -                                            field->parent_ip,
  -                                            sym_flags);
  -                     if (!ret)
  -                             return TRACE_TYPE_PARTIAL_LINE;
  -             }
  -             ret = trace_seq_printf(s, "\n");
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     case TRACE_CTX:
  -     case TRACE_WAKE: {
  -             struct ctx_switch_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             T = task_state_char(field->next_state);
  -             S = task_state_char(field->prev_state);
  -             ret = trace_seq_printf(s, " %5d:%3d:%c %s [%03d] %5d:%3d:%c\n",
  -                                    field->prev_pid,
  -                                    field->prev_prio,
  -                                    S,
  -                                    entry->type == TRACE_CTX ? "==>" : "  +",
  -                                    field->next_cpu,
  -                                    field->next_pid,
  -                                    field->next_prio,
  -                                    T);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     case TRACE_SPECIAL: {
  -             struct special_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             ret = trace_seq_printf(s, "# %ld %ld %ld\n",
  -                              field->arg1,
  -                              field->arg2,
  -                              field->arg3);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     case TRACE_STACK: {
  -             struct stack_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
  -                     if (i) {
  -                             ret = trace_seq_puts(s, " <= ");
  -                             if (!ret)
  -                                     return TRACE_TYPE_PARTIAL_LINE;
  -                     }
  -                     ret = seq_print_ip_sym(s, field->caller[i],
  -                                            sym_flags);
  -                     if (!ret)
  -                             return TRACE_TYPE_PARTIAL_LINE;
  -             }
  -             ret = trace_seq_puts(s, "\n");
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     case TRACE_PRINT: {
  -             struct print_entry *field;
  -
  -             trace_assign_type(field, entry);
 ++     event = ftrace_find_event(entry->type);
   
 -      ret = trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid);
 -      if (!ret)
 -              return TRACE_TYPE_PARTIAL_LINE;
 -      ret = trace_seq_printf(s, "[%03d] ", iter->cpu);
 -      if (!ret)
 -              return TRACE_TYPE_PARTIAL_LINE;
 -      ret = trace_seq_printf(s, "%5lu.%06lu: ", secs, usec_rem);
 -      if (!ret)
 -              return TRACE_TYPE_PARTIAL_LINE;
  -             seq_print_ip_sym(s, field->ip, sym_flags);
  -             trace_seq_printf(s, ": %s", field->buf);
  -             if (entry->flags & TRACE_FLAG_CONT)
  -                     trace_seq_print_cont(s, iter);
  -             break;
  -     }
  -     case TRACE_GRAPH_RET: {
  -             return print_graph_function(iter);
  -     }
  -     case TRACE_GRAPH_ENT: {
  -             return print_graph_function(iter);
 ++     if (trace_flags & TRACE_ITER_CONTEXT_INFO) {
 ++             ret = trace_print_context(iter);
 ++             if (ret)
 ++                     return ret;
 +      }
  -     case TRACE_BRANCH: {
  -             struct trace_branch *field;
   
 -      event = ftrace_find_event(entry->type);
  -             trace_assign_type(field, entry);
  -
  -             trace_seq_printf(s, "[%s] %s:%s:%d\n",
  -                              field->correct ? "  ok  " : " MISS ",
  -                              field->func,
  -                              field->file,
  -                              field->line);
  -             break;
  +     if (event && event->trace) {
 -              ret = event->trace(s, entry, sym_flags);
 ++             ret = event->trace(iter, sym_flags);
  +             if (ret)
  +                     return ret;
  +             return TRACE_TYPE_HANDLED;
        }
  -     case TRACE_USER_STACK: {
  -             struct userstack_entry *field;
  -
  -             trace_assign_type(field, entry);
  +     ret = trace_seq_printf(s, "Unknown type %d\n", entry->type);
  +     if (!ret)
  +             return TRACE_TYPE_PARTIAL_LINE;
   
  -             ret = seq_print_userip_objs(field, s, sym_flags);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             ret = trace_seq_putc(s, '\n');
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     }
        return TRACE_TYPE_HANDLED;
   }
   
@@@@ -1440,24 -1552,22 -2122,75 +1467,24 @@@@ static enum print_line_t print_raw_fmt(
   
        entry = iter->ent;
   
  -     if (entry->type == TRACE_CONT)
  -             return TRACE_TYPE_HANDLED;
  -
 --     ret = trace_seq_printf(s, "%d %d %llu ",
 --             entry->pid, iter->cpu, iter->ts);
 --     if (!ret)
 --             return TRACE_TYPE_PARTIAL_LINE;
  -
  -     switch (entry->type) {
  -     case TRACE_FN: {
  -             struct ftrace_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             ret = trace_seq_printf(s, "%x %x\n",
  -                                     field->ip,
  -                                     field->parent_ip);
 ++     if (trace_flags & TRACE_ITER_CONTEXT_INFO) {
 ++             ret = trace_seq_printf(s, "%d %d %llu ",
 ++                     entry->pid, iter->cpu, iter->ts);
 +              if (!ret)
 +                      return TRACE_TYPE_PARTIAL_LINE;
  -             break;
 +      }
  -     case TRACE_CTX:
  -     case TRACE_WAKE: {
  -             struct ctx_switch_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             T = task_state_char(field->next_state);
  -             S = entry->type == TRACE_WAKE ? '+' :
  -                     task_state_char(field->prev_state);
  -             ret = trace_seq_printf(s, "%d %d %c %d %d %d %c\n",
  -                                    field->prev_pid,
  -                                    field->prev_prio,
  -                                    S,
  -                                    field->next_cpu,
  -                                    field->next_pid,
  -                                    field->next_prio,
  -                                    T);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  -     }
  -     case TRACE_SPECIAL:
  -     case TRACE_USER_STACK:
  -     case TRACE_STACK: {
  -             struct special_entry *field;
   
  -             trace_assign_type(field, entry);
  -
  -             ret = trace_seq_printf(s, "# %ld %ld %ld\n",
  -                              field->arg1,
  -                              field->arg2,
  -                              field->arg3);
  -             if (!ret)
  -                     return TRACE_TYPE_PARTIAL_LINE;
  -             break;
  +     event = ftrace_find_event(entry->type);
  +     if (event && event->raw) {
 -              ret = event->raw(s, entry, 0);
 ++             ret = event->raw(iter, 0);
  +             if (ret)
  +                     return ret;
  +             return TRACE_TYPE_HANDLED;
        }
  -     case TRACE_PRINT: {
  -             struct print_entry *field;
  -
  -             trace_assign_type(field, entry);
  +     ret = trace_seq_printf(s, "%d ?\n", entry->type);
  +     if (!ret)
  +             return TRACE_TYPE_PARTIAL_LINE;
   
  -             trace_seq_printf(s, "# %lx %s", field->ip, field->buf);
  -             if (entry->flags & TRACE_FLAG_CONT)
  -                     trace_seq_print_cont(s, iter);
  -             break;
  -     }
  -     }
        return TRACE_TYPE_HANDLED;
   }
   
@@@@ -1470,16 -1580,14 -2216,54 +1497,16 @@@@ static enum print_line_t print_hex_fmt(
   
        entry = iter->ent;
   
  -     if (entry->type == TRACE_CONT)
  -             return TRACE_TYPE_HANDLED;
  -
 --     SEQ_PUT_HEX_FIELD_RET(s, entry->pid);
 --     SEQ_PUT_HEX_FIELD_RET(s, iter->cpu);
 --     SEQ_PUT_HEX_FIELD_RET(s, iter->ts);
  -
  -     switch (entry->type) {
  -     case TRACE_FN: {
  -             struct ftrace_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             SEQ_PUT_HEX_FIELD_RET(s, field->ip);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->parent_ip);
  -             break;
  -     }
  -     case TRACE_CTX:
  -     case TRACE_WAKE: {
  -             struct ctx_switch_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             T = task_state_char(field->next_state);
  -             S = entry->type == TRACE_WAKE ? '+' :
  -                     task_state_char(field->prev_state);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->prev_pid);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->prev_prio);
  -             SEQ_PUT_HEX_FIELD_RET(s, S);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->next_cpu);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->next_pid);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->next_prio);
  -             SEQ_PUT_HEX_FIELD_RET(s, T);
  -             break;
 ++     if (trace_flags & TRACE_ITER_CONTEXT_INFO) {
 ++             SEQ_PUT_HEX_FIELD_RET(s, entry->pid);
 ++             SEQ_PUT_HEX_FIELD_RET(s, iter->cpu);
 ++             SEQ_PUT_HEX_FIELD_RET(s, iter->ts);
 +      }
  -     case TRACE_SPECIAL:
  -     case TRACE_USER_STACK:
  -     case TRACE_STACK: {
  -             struct special_entry *field;
   
  -             trace_assign_type(field, entry);
  +     event = ftrace_find_event(entry->type);
  +     if (event && event->hex)
 -              event->hex(s, entry, 0);
 ++             event->hex(iter, 0);
   
  -             SEQ_PUT_HEX_FIELD_RET(s, field->arg1);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->arg2);
  -             SEQ_PUT_HEX_FIELD_RET(s, field->arg3);
  -             break;
  -     }
  -     }
        SEQ_PUT_FIELD_RET(s, newline);
   
        return TRACE_TYPE_HANDLED;
@@@@ -1509,17 -1617,15 -2295,50 +1536,17 @@@@ static enum print_line_t print_bin_fmt(
   
        entry = iter->ent;
   
  -     if (entry->type == TRACE_CONT)
  -             return TRACE_TYPE_HANDLED;
  -
 --     SEQ_PUT_FIELD_RET(s, entry->pid);
 --     SEQ_PUT_FIELD_RET(s, entry->cpu);
 --     SEQ_PUT_FIELD_RET(s, iter->ts);
  -
  -     switch (entry->type) {
  -     case TRACE_FN: {
  -             struct ftrace_entry *field;
  -
  -             trace_assign_type(field, entry);
  -
  -             SEQ_PUT_FIELD_RET(s, field->ip);
  -             SEQ_PUT_FIELD_RET(s, field->parent_ip);
  -             break;
 ++     if (trace_flags & TRACE_ITER_CONTEXT_INFO) {
 ++             SEQ_PUT_FIELD_RET(s, entry->pid);
 ++             SEQ_PUT_FIELD_RET(s, entry->cpu);
 ++             SEQ_PUT_FIELD_RET(s, iter->ts);
 +      }
  -     case TRACE_CTX: {
  -             struct ctx_switch_entry *field;
   
  -             trace_assign_type(field, entry);
  -
  -             SEQ_PUT_FIELD_RET(s, field->prev_pid);
  -             SEQ_PUT_FIELD_RET(s, field->prev_prio);
  -             SEQ_PUT_FIELD_RET(s, field->prev_state);
  -             SEQ_PUT_FIELD_RET(s, field->next_pid);
  -             SEQ_PUT_FIELD_RET(s, field->next_prio);
  -             SEQ_PUT_FIELD_RET(s, field->next_state);
  -             break;
  -     }
  -     case TRACE_SPECIAL:
  -     case TRACE_USER_STACK:
  -     case TRACE_STACK: {
  -             struct special_entry *field;
  +     event = ftrace_find_event(entry->type);
  +     if (event && event->binary)
 -              event->binary(s, entry, 0);
 ++             event->binary(iter, 0);
   
  -             trace_assign_type(field, entry);
  -
  -             SEQ_PUT_FIELD_RET(s, field->arg1);
  -             SEQ_PUT_FIELD_RET(s, field->arg2);
  -             SEQ_PUT_FIELD_RET(s, field->arg3);
  -             break;
  -     }
  -     }
  -     return 1;
  +     return TRACE_TYPE_HANDLED;
   }
   
   static int trace_empty(struct trace_iterator *iter)
@@@@ -3061,13 -3167,10 -3871,14 +3088,10 @@@@ __init static int tracer_alloc_buffers(
        trace_init_cmdlines();
   
        register_tracer(&nop_trace);
+ +     current_trace = &nop_trace;
   #ifdef CONFIG_BOOT_TRACER
        register_tracer(&boot_tracer);
- -     current_trace = &boot_tracer;
- -     current_trace->init(&global_trace);
- -#else
- -     current_trace = &nop_trace;
   #endif
  -
        /* All seems OK, enable tracing */
        tracing_disabled = 0;