aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-07-18 13:10:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-07-25 10:31:37 -0400
commit8760db726e2afcd1a78e2ff58965c6b35a5826cb (patch)
tree0d6d24bbac8de606f57d2dd09d58fc50a77cfcdf /tools/perf/util/hist.c
parent78b961ff8e67207adb15959526cdea4cc50ae1ed (diff)
perf hists: Return correct number of characters printed in callchain
Include the omitted number of characters printed for the first entry. Not that it really matters because nobody seem to care about the number of printed characters for now. But just in case. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1342631456-7233-2-git-send-email-fweisbec@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 514e2a4b367d..90dc35ae444a 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -708,7 +708,7 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
708 bool printed = false; 708 bool printed = false;
709 struct rb_node *node; 709 struct rb_node *node;
710 int i = 0; 710 int i = 0;
711 int ret; 711 int ret = 0;
712 712
713 /* 713 /*
714 * If have one single callchain root, don't bother printing 714 * If have one single callchain root, don't bother printing
@@ -747,8 +747,9 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
747 root = &cnode->rb_root; 747 root = &cnode->rb_root;
748 } 748 }
749 749
750 return __callchain__fprintf_graph(fp, root, total_samples, 750 ret += __callchain__fprintf_graph(fp, root, total_samples,
751 1, 1, left_margin); 751 1, 1, left_margin);
752 return ret;
752} 753}
753 754
754static size_t __callchain__fprintf_flat(FILE *fp, 755static size_t __callchain__fprintf_flat(FILE *fp,