.type = TRACE_BLK,
.trace = blk_trace_event_print,
.latency_trace = blk_trace_event_print,
- .raw = trace_nop_print,
- .hex = trace_nop_print,
.binary = blk_trace_event_print_binary,
};
goto partial;
}
- if (event && event->latency_trace)
+ if (event)
return event->latency_trace(iter, sym_flags);
if (!trace_seq_printf(s, "Unknown type %d\n", entry->type))
goto partial;
}
- if (event && event->trace)
+ if (event)
return event->trace(iter, sym_flags);
if (!trace_seq_printf(s, "Unknown type %d\n", entry->type))
}
event = ftrace_find_event(entry->type);
- if (event && event->raw)
+ if (event)
return event->raw(iter, 0);
if (!trace_seq_printf(s, "%d ?\n", entry->type))
}
event = ftrace_find_event(entry->type);
- if (event && event->hex) {
+ if (event) {
enum print_line_t ret = event->hex(iter, 0);
if (ret != TRACE_TYPE_HANDLED)
return ret;
}
event = ftrace_find_event(entry->type);
- if (event && event->binary)
- return event->binary(iter, 0);
-
- return TRACE_TYPE_HANDLED;
+ return event ? event->binary(iter, 0) : TRACE_TYPE_HANDLED;
}
static int trace_empty(struct trace_iterator *iter)
.type = TRACE_BRANCH,
.trace = trace_branch_print,
.latency_trace = trace_branch_print,
- .raw = trace_nop_print,
- .hex = trace_nop_print,
- .binary = trace_nop_print,
};
static struct tracer branch_trace __read_mostly =
if (ftrace_find_event(event->type))
goto out;
+ if (event->trace == NULL)
+ event->trace = trace_nop_print;
+ if (event->latency_trace == NULL)
+ event->latency_trace = trace_nop_print;
+ if (event->raw == NULL)
+ event->raw = trace_nop_print;
+ if (event->hex == NULL)
+ event->hex = trace_nop_print;
+ if (event->binary == NULL)
+ event->binary = trace_nop_print;
+
key = event->type & (EVENT_HASHSIZE - 1);
hlist_add_head_rcu(&event->node, &event_hash[key]);
.trace = trace_print_print,
.latency_trace = trace_print_print,
.raw = trace_print_raw,
- .hex = trace_nop_print,
- .binary = trace_nop_print,
};
static struct trace_event *events[] __initdata = {