提交 3848c23b 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

perf report: Don't show blank lines if entry has no callchain

When all callchains of a hist entry is percent-limited, do not add a
blank line at the end.  It makes the entry look like it doesn't have
callchains.
Reported-and-Tested-by: NJiri Olsa <jolsa@kernel.org>
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20160128122454.GA27446@danjae.kornetSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 59c624e2
...@@ -233,7 +233,10 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root, ...@@ -233,7 +233,10 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
ret += __callchain__fprintf_graph(fp, root, total_samples, ret += __callchain__fprintf_graph(fp, root, total_samples,
1, 1, left_margin); 1, 1, left_margin);
ret += fprintf(fp, "\n"); if (ret) {
/* do not add a blank line if it printed nothing */
ret += fprintf(fp, "\n");
}
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册