aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2015-10-27 08:27:39 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2015-10-27 08:27:39 +0000
commitc911a315c5e87d9fce3e03011141e6879d00f47f (patch)
treede1e986a9e980fe7400311b3beac27291e2f03dc
parent141ce84e5d0b4cdd841c9f64a56b3219ecc8283c (diff)
downloadlinux-hacking/android-4.1.tar.gz
fixup! trace: add non-hierarchical function_graph optionhacking/android-4.1
-rw-r--r--kernel/trace/trace_output.c88
1 files changed, 36 insertions, 52 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index cb969af10000..a7f47c5ff7b9 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -566,7 +566,6 @@ int trace_print_context(struct trace_iterator *iter)
unsigned long long t;
unsigned long secs, usec_rem;
char comm[TASK_COMM_LEN];
- int ret;
int tgid;
trace_find_cmdline(entry->pid, comm);
@@ -579,8 +578,6 @@ int trace_print_context(struct trace_iterator *iter)
trace_seq_puts(s, "(-----) ");
else
trace_seq_printf(s, "(%5d) ", tgid);
- if (!ret)
- return 0;
}
trace_seq_printf(s, "[%03d] ", iter->cpu);
@@ -906,31 +903,25 @@ static enum print_line_t trace_graph_ent_trace(struct trace_iterator *iter, int
trace_assign_type(field, iter->ent);
- if (!trace_seq_puts(s, "graph_ent: func="))
- return TRACE_TYPE_PARTIAL_LINE;
-
- if (!seq_print_ip_sym(s, field->graph_ent.func, flags))
- return TRACE_TYPE_PARTIAL_LINE;
+ trace_seq_puts(s, "graph_ent: func=");
+ seq_print_ip_sym(s, field->graph_ent.func, flags);
+ trace_seq_puts(s, "\n");
- if (!trace_seq_puts(s, "\n"))
- return TRACE_TYPE_PARTIAL_LINE;
-
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ent_raw(struct trace_iterator *iter, int flags,
struct trace_event *event)
{
struct ftrace_graph_ent_entry *field;
+ struct trace_seq *s = &iter->seq;
trace_assign_type(field, iter->ent);
- if (!trace_seq_printf(&iter->seq, "%lx %d\n",
- field->graph_ent.func,
- field->graph_ent.depth))
- return TRACE_TYPE_PARTIAL_LINE;
+ trace_seq_printf(s, "%lx %d\n",
+ field->graph_ent.func, field->graph_ent.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ent_hex(struct trace_iterator *iter, int flags,
@@ -941,10 +932,10 @@ static enum print_line_t trace_graph_ent_hex(struct trace_iterator *iter, int fl
trace_assign_type(field, iter->ent);
- SEQ_PUT_HEX_FIELD_RET(s, field->graph_ent.func);
- SEQ_PUT_HEX_FIELD_RET(s, field->graph_ent.depth);
+ SEQ_PUT_HEX_FIELD(s, field->graph_ent.func);
+ SEQ_PUT_HEX_FIELD(s, field->graph_ent.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ent_bin(struct trace_iterator *iter, int flags,
@@ -955,10 +946,10 @@ static enum print_line_t trace_graph_ent_bin(struct trace_iterator *iter, int fl
trace_assign_type(field, iter->ent);
- SEQ_PUT_FIELD_RET(s, field->graph_ent.func);
- SEQ_PUT_FIELD_RET(s, field->graph_ent.depth);
+ SEQ_PUT_FIELD(s, field->graph_ent.func);
+ SEQ_PUT_FIELD(s, field->graph_ent.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static struct trace_event_functions trace_graph_ent_funcs = {
@@ -983,34 +974,27 @@ static enum print_line_t trace_graph_ret_trace(struct trace_iterator *iter, int
trace_assign_type(field, entry);
- if (!trace_seq_puts(s, "graph_ret: func="))
- return TRACE_TYPE_PARTIAL_LINE;
+ trace_seq_puts(s, "graph_ret: func=");
+ seq_print_ip_sym(s, field->ret.func, flags);
+ trace_seq_puts(s, "\n");
- if (!seq_print_ip_sym(s, field->ret.func, flags))
- return TRACE_TYPE_PARTIAL_LINE;
-
- if (!trace_seq_puts(s, "\n"))
- return TRACE_TYPE_PARTIAL_LINE;
-
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ret_raw(struct trace_iterator *iter, int flags,
struct trace_event *event)
{
struct ftrace_graph_ret_entry *field;
+ struct trace_seq *s = &iter->seq;
trace_assign_type(field, iter->ent);
- if (!trace_seq_printf(&iter->seq, "%lx %lld %lld %ld %d\n",
- field->ret.func,
- field->ret.calltime,
- field->ret.rettime,
- field->ret.overrun,
- field->ret.depth));
- return TRACE_TYPE_PARTIAL_LINE;
+ trace_seq_printf(s, "%lx %lld %lld %ld %d\n",
+ field->ret.func, field->ret.calltime,
+ field->ret.rettime, field->ret.overrun,
+ field->ret.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ret_hex(struct trace_iterator *iter, int flags,
@@ -1021,13 +1005,13 @@ static enum print_line_t trace_graph_ret_hex(struct trace_iterator *iter, int fl
trace_assign_type(field, iter->ent);
- SEQ_PUT_HEX_FIELD_RET(s, field->ret.func);
- SEQ_PUT_HEX_FIELD_RET(s, field->ret.calltime);
- SEQ_PUT_HEX_FIELD_RET(s, field->ret.rettime);
- SEQ_PUT_HEX_FIELD_RET(s, field->ret.overrun);
- SEQ_PUT_HEX_FIELD_RET(s, field->ret.depth);
+ SEQ_PUT_HEX_FIELD(s, field->ret.func);
+ SEQ_PUT_HEX_FIELD(s, field->ret.calltime);
+ SEQ_PUT_HEX_FIELD(s, field->ret.rettime);
+ SEQ_PUT_HEX_FIELD(s, field->ret.overrun);
+ SEQ_PUT_HEX_FIELD(s, field->ret.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static enum print_line_t trace_graph_ret_bin(struct trace_iterator *iter, int flags,
@@ -1038,13 +1022,13 @@ static enum print_line_t trace_graph_ret_bin(struct trace_iterator *iter, int fl
trace_assign_type(field, iter->ent);
- SEQ_PUT_FIELD_RET(s, field->ret.func);
- SEQ_PUT_FIELD_RET(s, field->ret.calltime);
- SEQ_PUT_FIELD_RET(s, field->ret.rettime);
- SEQ_PUT_FIELD_RET(s, field->ret.overrun);
- SEQ_PUT_FIELD_RET(s, field->ret.depth);
+ SEQ_PUT_FIELD(s, field->ret.func);
+ SEQ_PUT_FIELD(s, field->ret.calltime);
+ SEQ_PUT_FIELD(s, field->ret.rettime);
+ SEQ_PUT_FIELD(s, field->ret.overrun);
+ SEQ_PUT_FIELD(s, field->ret.depth);
- return TRACE_TYPE_HANDLED;
+ return trace_handle_return(s);
}
static struct trace_event_functions trace_graph_ret_funcs = {