tracing: remove extra latency_trace method from trace structure
authorSteven Rostedt <srostedt@redhat.com>
Thu, 5 Mar 2009 02:42:04 +0000 (21:42 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Thu, 5 Mar 2009 02:42:04 +0000 (21:42 -0500)
Impact: clean up

The trace and latency_trace function pointers are identical for
every tracer but the function tracer. The differences in the function
tracer are trivial (latency output puts paranthesis around parent).

This patch removes the latency_trace pointer and all prints will
now just use the trace output function pointer.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
kernel/trace/blktrace.c
kernel/trace/trace.c
kernel/trace/trace_branch.c
kernel/trace/trace_output.c
kernel/trace/trace_output.h

index e82cb9e930cc2e328830afe163e89af032c77f41..e39679a72a3b5c22260349b180e5b3a9ab44e033 100644 (file)
@@ -1231,7 +1231,6 @@ static struct tracer blk_tracer __read_mostly = {
 static struct trace_event trace_blk_event = {
        .type           = TRACE_BLK,
        .trace          = blk_trace_event_print,
-       .latency_trace  = blk_trace_event_print,
        .binary         = blk_trace_event_print_binary,
 };
 
index 55fcbb56795085b0dd02c1d57578eaa629bcd4e6..21b89ecb8480e76cb24bcaa2a8f78c86007804fb 100644 (file)
@@ -1485,7 +1485,7 @@ static enum print_line_t print_lat_fmt(struct trace_iterator *iter)
        }
 
        if (event)
-               return event->latency_trace(iter, sym_flags);
+               return event->trace(iter, sym_flags);
 
        if (!trace_seq_printf(s, "Unknown type %d\n", entry->type))
                goto partial;
index c2e68d440c4da925f8810e57009abf40e3ca77b7..aaa0755268b97bfc7e6f7f5ea9bcfb1cb344dc12 100644 (file)
@@ -159,7 +159,6 @@ static enum print_line_t trace_branch_print(struct trace_iterator *iter,
 static struct trace_event trace_branch_event = {
        .type           = TRACE_BRANCH,
        .trace          = trace_branch_print,
-       .latency_trace  = trace_branch_print,
 };
 
 static struct tracer branch_trace __read_mostly =
index 9fc815031b097b5a14eb3926a3f2a39f7936780d..306fef84c503b86439c18fc44ff8f34460900881 100644 (file)
@@ -437,8 +437,6 @@ int register_ftrace_event(struct trace_event *event)
 
        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)
@@ -480,29 +478,6 @@ enum print_line_t trace_nop_print(struct trace_iterator *iter, int flags)
 }
 
 /* TRACE_FN */
-static enum print_line_t trace_fn_latency(struct trace_iterator *iter,
-                                         int flags)
-{
-       struct ftrace_entry *field;
-       struct trace_seq *s = &iter->seq;
-
-       trace_assign_type(field, iter->ent);
-
-       if (!seq_print_ip_sym(s, field->ip, flags))
-               goto partial;
-       if (!trace_seq_puts(s, " ("))
-               goto partial;
-       if (!seq_print_ip_sym(s, field->parent_ip, flags))
-               goto partial;
-       if (!trace_seq_puts(s, ")\n"))
-               goto partial;
-
-       return TRACE_TYPE_HANDLED;
-
- partial:
-       return TRACE_TYPE_PARTIAL_LINE;
-}
-
 static enum print_line_t trace_fn_trace(struct trace_iterator *iter, int flags)
 {
        struct ftrace_entry *field;
@@ -573,7 +548,6 @@ static enum print_line_t trace_fn_bin(struct trace_iterator *iter, int flags)
 static struct trace_event trace_fn_event = {
        .type           = TRACE_FN,
        .trace          = trace_fn_trace,
-       .latency_trace  = trace_fn_latency,
        .raw            = trace_fn_raw,
        .hex            = trace_fn_hex,
        .binary         = trace_fn_bin,
@@ -705,7 +679,6 @@ static enum print_line_t trace_ctxwake_bin(struct trace_iterator *iter,
 static struct trace_event trace_ctx_event = {
        .type           = TRACE_CTX,
        .trace          = trace_ctx_print,
-       .latency_trace  = trace_ctx_print,
        .raw            = trace_ctx_raw,
        .hex            = trace_ctx_hex,
        .binary         = trace_ctxwake_bin,
@@ -714,7 +687,6 @@ static struct trace_event trace_ctx_event = {
 static struct trace_event trace_wake_event = {
        .type           = TRACE_WAKE,
        .trace          = trace_wake_print,
-       .latency_trace  = trace_wake_print,
        .raw            = trace_wake_raw,
        .hex            = trace_wake_hex,
        .binary         = trace_ctxwake_bin,
@@ -770,7 +742,6 @@ static enum print_line_t trace_special_bin(struct trace_iterator *iter,
 static struct trace_event trace_special_event = {
        .type           = TRACE_SPECIAL,
        .trace          = trace_special_print,
-       .latency_trace  = trace_special_print,
        .raw            = trace_special_print,
        .hex            = trace_special_hex,
        .binary         = trace_special_bin,
@@ -808,7 +779,6 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
 static struct trace_event trace_stack_event = {
        .type           = TRACE_STACK,
        .trace          = trace_stack_print,
-       .latency_trace  = trace_stack_print,
        .raw            = trace_special_print,
        .hex            = trace_special_hex,
        .binary         = trace_special_bin,
@@ -838,7 +808,6 @@ static enum print_line_t trace_user_stack_print(struct trace_iterator *iter,
 static struct trace_event trace_user_stack_event = {
        .type           = TRACE_USER_STACK,
        .trace          = trace_user_stack_print,
-       .latency_trace  = trace_user_stack_print,
        .raw            = trace_special_print,
        .hex            = trace_special_hex,
        .binary         = trace_special_bin,
@@ -883,7 +852,6 @@ static enum print_line_t trace_print_raw(struct trace_iterator *iter, int flags)
 static struct trace_event trace_print_event = {
        .type           = TRACE_PRINT,
        .trace          = trace_print_print,
-       .latency_trace  = trace_print_print,
        .raw            = trace_print_raw,
 };
 
index 551a25a72217f10228c850d9e27ea7da97b22a42..8a34d688ed63fb2011362829769048a50a7a5079 100644 (file)
@@ -10,7 +10,6 @@ struct trace_event {
        struct hlist_node       node;
        int                     type;
        trace_print_func        trace;
-       trace_print_func        latency_trace;
        trace_print_func        raw;
        trace_print_func        hex;
        trace_print_func        binary;