]> Git Repo - linux.git/commitdiff
perf report: Don't show blank lines if entry has no callchain
authorNamhyung Kim <[email protected]>
Thu, 28 Jan 2016 12:24:54 +0000 (21:24 +0900)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 1 Feb 2016 20:51:09 +0000 (17:51 -0300)
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: Jiri Olsa <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/ui/stdio/hist.c

index 76ff46becac8f5f974f0da14400a500725dcde47..691e52ce7510c67977ed7ff103f1b2030a1e67d2 100644 (file)
@@ -233,7 +233,10 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
 
        ret += __callchain__fprintf_graph(fp, root, total_samples,
                                          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;
 }
This page took 0.056543 seconds and 4 git commands to generate.