提交 4ed962eb 编写于 作者: A Andi Kleen 提交者: Arnaldo Carvalho de Melo

perf stat: Print generic metric header even for failed expressions

Print the generic metric header even when the expression evaluation
failed. Otherwise an expression that fails on the first collections due
to division by zero may suddenly reappear later without an header.
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
Acked-by: NJiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20170831194036.30146-5-andi@firstfloor.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 bba49af8
......@@ -662,7 +662,9 @@ static void generic_metric(const char *metric_expr,
out->force_header ? name : "",
ratio);
else
print_metric(ctxp, NULL, NULL, "", 0);
print_metric(ctxp, NULL, NULL,
out->force_header ?
(metric_name ? metric_name : name) : "", 0);
} else
print_metric(ctxp, NULL, NULL, "", 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册