提交 8760db72 编写于 作者: F Frederic Weisbecker 提交者: Arnaldo Carvalho de Melo

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: NFrederic 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 78b961ff
......@@ -708,7 +708,7 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
bool printed = false;
struct rb_node *node;
int i = 0;
int ret;
int ret = 0;
/*
* 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,
root = &cnode->rb_root;
}
return __callchain__fprintf_graph(fp, root, total_samples,
ret += __callchain__fprintf_graph(fp, root, total_samples,
1, 1, left_margin);
return ret;
}
static size_t __callchain__fprintf_flat(FILE *fp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册