* Standard events
  */
 
-int
-trace_nop_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+int trace_nop_print(struct trace_iterator *iter, int flags)
 {
        return 0;
 }
 
 /* TRACE_FN */
-static int
-trace_fn_latency(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_fn_latency(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!seq_print_ip_sym(s, field->ip, flags))
                goto partial;
        return TRACE_TYPE_PARTIAL_LINE;
 }
 
-static int
-trace_fn_trace(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_fn_trace(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!seq_print_ip_sym(s, field->ip, flags))
                goto partial;
        return TRACE_TYPE_PARTIAL_LINE;
 }
 
-static int
-trace_fn_raw(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_fn_raw(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
-       if (!trace_seq_printf(s, "%lx %lx\n",
+       if (!trace_seq_printf(&iter->seq, "%lx %lx\n",
                              field->ip,
                              field->parent_ip))
                return TRACE_TYPE_PARTIAL_LINE;
        return 0;
 }
 
-static int
-trace_fn_hex(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_fn_hex(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        SEQ_PUT_HEX_FIELD_RET(s, field->ip);
        SEQ_PUT_HEX_FIELD_RET(s, field->parent_ip);
        return 0;
 }
 
-static int
-trace_fn_bin(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_fn_bin(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        SEQ_PUT_FIELD_RET(s, field->ip);
        SEQ_PUT_FIELD_RET(s, field->parent_ip);
 };
 
 /* TRACE_CTX an TRACE_WAKE */
-static int
-trace_ctxwake_print(struct trace_seq *s, struct trace_entry *entry, int flags,
-                   char *delim)
+static int trace_ctxwake_print(struct trace_iterator *iter, char *delim)
 {
        struct ctx_switch_entry *field;
        char *comm;
        int S, T;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        T = task_state_char(field->next_state);
        S = task_state_char(field->prev_state);
        comm = trace_find_cmdline(field->next_pid);
-       if (!trace_seq_printf(s, " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
+       if (!trace_seq_printf(&iter->seq,
+                             " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
                              field->prev_pid,
                              field->prev_prio,
                              S, delim,
        return 0;
 }
 
-static int
-trace_ctx_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_ctx_print(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_print(s, entry, flags, "==>");
+       return trace_ctxwake_print(iter, "==>");
 }
 
-static int
-trace_wake_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_wake_print(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_print(s, entry, flags, "  +");
+       return trace_ctxwake_print(iter, "  +");
 }
 
-static int
-trace_ctxwake_raw(struct trace_seq *s, struct trace_entry *entry, int flags,
-                 char S)
+static int trace_ctxwake_raw(struct trace_iterator *iter, char S)
 {
        struct ctx_switch_entry *field;
        int T;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!S)
                task_state_char(field->prev_state);
        T = task_state_char(field->next_state);
-       if (!trace_seq_printf(s, "%d %d %c %d %d %d %c\n",
+       if (!trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n",
                              field->prev_pid,
                              field->prev_prio,
                              S,
        return 0;
 }
 
-static int
-trace_ctx_raw(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_ctx_raw(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_raw(s, entry, flags, 0);
+       return trace_ctxwake_raw(iter, 0);
 }
 
-static int
-trace_wake_raw(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_wake_raw(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_raw(s, entry, flags, '+');
+       return trace_ctxwake_raw(iter, '+');
 }
 
 
-static int
-trace_ctxwake_hex(struct trace_seq *s, struct trace_entry *entry, int flags,
-                 char S)
+static int trace_ctxwake_hex(struct trace_iterator *iter, char S)
 {
        struct ctx_switch_entry *field;
+       struct trace_seq *s = &iter->seq;
        int T;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!S)
                task_state_char(field->prev_state);
        return 0;
 }
 
-static int
-trace_ctx_hex(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_ctx_hex(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_hex(s, entry, flags, 0);
+       return trace_ctxwake_hex(iter, 0);
 }
 
-static int
-trace_wake_hex(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_wake_hex(struct trace_iterator *iter, int flags)
 {
-       return trace_ctxwake_hex(s, entry, flags, '+');
+       return trace_ctxwake_hex(iter, '+');
 }
 
-static int
-trace_ctxwake_bin(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_ctxwake_bin(struct trace_iterator *iter, int flags)
 {
        struct ctx_switch_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        SEQ_PUT_FIELD_RET(s, field->prev_pid);
        SEQ_PUT_FIELD_RET(s, field->prev_prio);
 };
 
 /* TRACE_SPECIAL */
-static int
-trace_special_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_special_print(struct trace_iterator *iter, int flags)
 {
        struct special_entry *field;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
-       if (!trace_seq_printf(s, "# %ld %ld %ld\n",
+       if (!trace_seq_printf(&iter->seq, "# %ld %ld %ld\n",
                              field->arg1,
                              field->arg2,
                              field->arg3))
        return 0;
 }
 
-static int
-trace_special_hex(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_special_hex(struct trace_iterator *iter, int flags)
 {
        struct special_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        SEQ_PUT_HEX_FIELD_RET(s, field->arg1);
        SEQ_PUT_HEX_FIELD_RET(s, field->arg2);
        return 0;
 }
 
-static int
-trace_special_bin(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_special_bin(struct trace_iterator *iter, int flags)
 {
        struct special_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        SEQ_PUT_FIELD_RET(s, field->arg1);
        SEQ_PUT_FIELD_RET(s, field->arg2);
 
 /* TRACE_STACK */
 
-static int
-trace_stack_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_stack_print(struct trace_iterator *iter, int flags)
 {
        struct stack_entry *field;
+       struct trace_seq *s = &iter->seq;
        int i;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
                if (i) {
 };
 
 /* TRACE_USER_STACK */
-static int
-trace_user_stack_print(struct trace_seq *s, struct trace_entry *entry,
-                      int flags)
+static int trace_user_stack_print(struct trace_iterator *iter, int flags)
 {
        struct userstack_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!seq_print_userip_objs(field, s, flags))
                goto partial;
 };
 
 /* TRACE_PRINT */
-static int
-trace_print_print(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_print_print(struct trace_iterator *iter, int flags)
 {
        struct print_entry *field;
+       struct trace_seq *s = &iter->seq;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
        if (!seq_print_ip_sym(s, field->ip, flags))
                goto partial;
        return TRACE_TYPE_PARTIAL_LINE;
 }
 
-static int
-trace_print_raw(struct trace_seq *s, struct trace_entry *entry, int flags)
+static int trace_print_raw(struct trace_iterator *iter, int flags)
 {
        struct print_entry *field;
 
-       trace_assign_type(field, entry);
+       trace_assign_type(field, iter->ent);
 
-       if (!trace_seq_printf(s, "# %lx %s", field->ip, field->buf))
+       if (!trace_seq_printf(&iter->seq, "# %lx %s", field->ip, field->buf))
                goto partial;
 
        return 0;