Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315907
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/12] perf hists browser: Fix callchain_node__count_rows() |
| Date | 2016-01-24 15:00 +0100 |
| Message-ID | <qUtmX-5A8-31@gated-at.bofh.it> (permalink) |
| References | <qUtmW-5A8-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Like other functions, it should stop counting if there's any folded
callchain. Because of this it occasionally lose the cursor at the end.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/ui/browsers/hists.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 349c5de73287..c7ca36dae89f 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -215,7 +215,7 @@ static int callchain_node__count_folded_rows(struct callchain_node *node __maybe
static int callchain_node__count_rows(struct callchain_node *node)
{
struct callchain_list *chain;
- bool unfolded = false;
+ char folded_sign = ' ';
int n = 0;
if (callchain_param.mode == CHAIN_FLAT)
@@ -225,10 +225,13 @@ static int callchain_node__count_rows(struct callchain_node *node)
list_for_each_entry(chain, &node->val, list) {
++n;
- unfolded = chain->unfolded;
+
+ folded_sign = callchain_list__folded(chain);
+ if (folded_sign == '+')
+ break;
}
- if (unfolded)
+ if (folded_sign == '-')
n += callchain_node__count_rows_rb_tree(node);
return n;
--
2.6.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 07/12] perf hists browser: Fix callchain_node__count_rows() Namhyung Kim <namhyung@kernel.org> - 2016-01-24 15:00 +0100
Re: [PATCH 07/12] perf hists browser: Fix callchain_node__count_rows() Jiri Olsa <jolsa@redhat.com> - 2016-01-26 12:50 +0100
Re: [PATCH 07/12] perf hists browser: Fix callchain_node__count_rows() Namhyung Kim <namhyung@kernel.org> - 2016-01-26 13:40 +0100
csiph-web