diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /tools/perf/ui/stdio/hist.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'tools/perf/ui/stdio/hist.c')
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index c244cb5..6c15268 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c @@ -213,19 +213,20 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root, return ret; } -static size_t __callchain__fprintf_flat(FILE *fp, struct callchain_node *node, +static size_t __callchain__fprintf_flat(FILE *fp, + struct callchain_node *self, u64 total_samples) { struct callchain_list *chain; size_t ret = 0; - if (!node) + if (!self) return 0; - ret += __callchain__fprintf_flat(fp, node->parent, total_samples); + ret += __callchain__fprintf_flat(fp, self->parent, total_samples); - list_for_each_entry(chain, &node->val, list) { + list_for_each_entry(chain, &self->val, list) { if (chain->ip >= PERF_CONTEXT_MAX) continue; if (chain->ms.sym) @@ -238,14 +239,15 @@ static size_t __callchain__fprintf_flat(FILE *fp, struct callchain_node *node, return ret; } -static size_t callchain__fprintf_flat(FILE *fp, struct rb_root *tree, +static size_t callchain__fprintf_flat(FILE *fp, struct rb_root *self, u64 total_samples) { size_t ret = 0; u32 entries_printed = 0; + struct rb_node *rb_node; struct callchain_node *chain; - struct rb_node *rb_node = rb_first(tree); + rb_node = rb_first(self); while (rb_node) { double percent; |