[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a8cd1f4393032cd87e98803346865cdbceb15ad3@git.kernel.org>
Date: Sat, 14 Mar 2015 00:04:50 -0700
From: tip-bot for He Kuang <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: namhyung@...nel.org, hpa@...or.com, linux-kernel@...r.kernel.org,
tglx@...utronix.de, a.p.zijlstra@...llo.nl, hekuang@...wei.com,
paulus@...ba.org, acme@...hat.com, mingo@...nel.org,
jolsa@...nel.org, wangnan0@...wei.com
Subject: [tip:perf/core] perf hists browser:
Fix UI bug after zoom into thread/dso/symbol
Commit-ID: a8cd1f4393032cd87e98803346865cdbceb15ad3
Gitweb: http://git.kernel.org/tip/a8cd1f4393032cd87e98803346865cdbceb15ad3
Author: He Kuang <hekuang@...wei.com>
AuthorDate: Wed, 11 Mar 2015 20:36:03 +0800
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 12 Mar 2015 12:39:59 -0300
perf hists browser: Fix UI bug after zoom into thread/dso/symbol
When zoom into thread/dso/symbol, the fold/unfold stat is cleared in
hists__filter_by_thread/dso/symbol(), but h->nr_rows is not cleared. So
if we toggle fold stat on the unfold entires, nr_entries got a wrong
value.
This bug can be reproduced as follows:
$ perf record -g -e syscalls:sys_enter_open ls
$ perf report
Children Self Command Shared Object Symbol
================================================================
+ 50.00% 0.00% ls ld64.so [.] _dl_get_ready_to_run
- 50.00% 0.00% ls ld64.so [.] _dl_load_shared_library
_dl_load_shared_library <= [Zoom into thread/dso]
_dl_get_ready_to_run
_start
...
In the new thread hists, all entries reset to fold, if we unfold the
same entry as we previously unfolded, nr_entries got wrong value, and we
can't move down cursor to bottom row.
Thread: ls
Children Self Command Shared Object Symbol
================================================================
+ 50.00% 0.00% ls ld64.so [.] _dl_get_ready_to_run
- 50.00% 0.00% ls ld64.so [.] _dl_load_shared_library
_dl_load_shared_library
_dl_get_ready_to_run <= [cursor may stop here, can't move down]
_start
...
This patch clear h->nr_rows to fix this bug.
Signed-off-by: He Kuang <hekuang@...wei.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/1426077363-855-2-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/hist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 95f5ab7..d9a6d35 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1171,6 +1171,7 @@ static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h
/* force fold unfiltered entry for simplicity */
h->ms.unfolded = false;
h->row_offset = 0;
+ h->nr_rows = 0;
hists->stats.nr_non_filtered_samples += h->stat.nr_events;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists