提交 11edda06 编写于 作者: M Markus Metzger 提交者: Ingo Molnar

x86, ftrace, hw-branch-tracer: change trace format

Change the hw-branch-tracer format to be more readable.
Signed-off-by: NMarkus Metzger <markus.t.metzger@intel.com>
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 e23b8ad8
...@@ -146,10 +146,7 @@ static void bts_trace_reset(struct trace_array *tr) ...@@ -146,10 +146,7 @@ static void bts_trace_reset(struct trace_array *tr)
static void bts_trace_print_header(struct seq_file *m) static void bts_trace_print_header(struct seq_file *m)
{ {
seq_puts(m, seq_puts(m, "# CPU# TO <- FROM\n");
"# CPU# FROM TO FUNCTION\n");
seq_puts(m,
"# | | | |\n");
} }
static enum print_line_t bts_trace_print_line(struct trace_iterator *iter) static enum print_line_t bts_trace_print_line(struct trace_iterator *iter)
...@@ -157,15 +154,15 @@ static enum print_line_t bts_trace_print_line(struct trace_iterator *iter) ...@@ -157,15 +154,15 @@ static enum print_line_t bts_trace_print_line(struct trace_iterator *iter)
struct trace_entry *entry = iter->ent; struct trace_entry *entry = iter->ent;
struct trace_seq *seq = &iter->seq; struct trace_seq *seq = &iter->seq;
struct hw_branch_entry *it; struct hw_branch_entry *it;
unsigned long symflags = TRACE_ITER_SYM_OFFSET;
trace_assign_type(it, entry); trace_assign_type(it, entry);
if (entry->type == TRACE_HW_BRANCHES) { if (entry->type == TRACE_HW_BRANCHES) {
if (trace_seq_printf(seq, "%4d ", entry->cpu) && if (trace_seq_printf(seq, "%4d ", entry->cpu) &&
trace_seq_printf(seq, "0x%016llx -> 0x%016llx ", seq_print_ip_sym(seq, it->to, symflags) &&
it->from, it->to) && trace_seq_printf(seq, "\t <- ") &&
(!it->from || seq_print_ip_sym(seq, it->from, symflags) &&
seq_print_ip_sym(seq, it->from, /* sym_flags = */ 0)) &&
trace_seq_printf(seq, "\n")) trace_seq_printf(seq, "\n"))
return TRACE_TYPE_HANDLED; return TRACE_TYPE_HANDLED;
return TRACE_TYPE_PARTIAL_LINE;; return TRACE_TYPE_PARTIAL_LINE;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册