lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Mar 2015 17:05:19 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	He Kuang <hekuang@...wei.com>
Cc:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
	acme@...nel.org, jolsa@...nel.org, wangnan0@...wei.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 2/2] perf hists browser: Fix UI bug after zoom into
 thread/dso/symbol

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@...wei.com>

Acked-by: Namhyung Kim <namhyung@...nel.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@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ