LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org> To: He Kuang <hekuang@huawei.com> Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com, acme@kernel.org, jolsa@kernel.org, wangnan0@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 2/2] perf hists browser: Fix UI bug after zoom into thread/dso/symbol Date: Thu, 12 Mar 2015 17:05:19 +0900 [thread overview] Message-ID: <20150312080519.GL943@sejong> (raw) In-Reply-To: <1426077363-855-2-git-send-email-hekuang@huawei.com> On Wed, Mar 11, 2015 at 08:36:03PM +0800, He Kuang wrote: > 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@huawei.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > --- > 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 70b48a6..24aff7d 100644 > --- a/tools/perf/util/hist.c > +++ b/tools/perf/util/hist.c > @@ -1169,6 +1169,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; > > -- > 2.2.0.33.gc18b867 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-03-12 8:11 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-06 12:51 [PATCH] perf hists browser: Fix UI bug after fold/unfold He Kuang 2015-03-10 6:28 ` Namhyung Kim 2015-03-10 7:26 ` He Kuang 2015-03-11 0:26 ` Namhyung Kim 2015-03-11 12:36 ` [PATCHv2 1/2] " He Kuang 2015-03-11 12:36 ` [PATCHv2 2/2] perf hists browser: Fix UI bug after zoom into thread/dso/symbol He Kuang 2015-03-11 14:12 ` Arnaldo Carvalho de Melo 2015-03-12 8:05 ` Namhyung Kim [this message] 2015-03-14 7:04 ` [tip:perf/core] " tip-bot for He Kuang 2015-03-11 13:48 ` [PATCHv2 1/2] perf hists browser: Fix UI bug after fold/unfold Arnaldo Carvalho de Melo 2015-03-12 7:21 ` [PATCHv3] " He Kuang 2015-03-12 7:51 ` Namhyung Kim 2015-03-12 16:19 ` Arnaldo Carvalho de Melo 2015-03-14 7:05 ` [tip:perf/core] " tip-bot for He Kuang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150312080519.GL943@sejong \ --to=namhyung@kernel.org \ --cc=a.p.zijlstra@chello.nl \ --cc=acme@kernel.org \ --cc=hekuang@huawei.com \ --cc=jolsa@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=paulus@samba.org \ --cc=wangnan0@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).