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]
Message-ID: <20191219091008.GB8141@krava>
Date:   Thu, 19 Dec 2019 10:10:08 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v5 4/4] perf report: support hotkey to let user select
 any event for sorting

On Thu, Dec 19, 2019 at 02:09:29PM +0800, Jin Yao wrote:

SNIP

> +		case '0' ... '9':
> +			if (!symbol_conf.event_group ||
> +			    evsel->core.nr_members < 2) {
> +				snprintf(buf, sizeof(buf),
> +					 "Sort by index only available with group events!");
> +				helpline = buf;
> +				continue;
> +			}
> +
> +			symbol_conf.group_sort_idx = key - '0';
> +
> +			if (symbol_conf.group_sort_idx >= evsel->core.nr_members) {
> +				snprintf(buf, sizeof(buf),
> +					 "Max event group index to sort is %d (index from 0 to %d)",
> +					 evsel->core.nr_members - 1,
> +					 evsel->core.nr_members - 1);
> +				helpline = buf;
> +				continue;
> +			}
> +
> +			key = K_RELOAD;
> +			goto out_free_stack;
>  		case 'a':
>  			if (!hists__has(hists, sym)) {
>  				ui_browser__warning(&browser->b, delay_secs * 2,
> -- 
> 2.17.1
> 

maybe also something like this to eliminate unneeded refresh?

jirka


---
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 22e76bd1a2d9..9f5dd48500a2 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2947,6 +2947,9 @@ static int perf_evsel__hists_browse(struct evsel *evsel, int nr_events,
 				continue;
 			}
 
+			if (key - '0' == symbol_conf.group_sort_idx)
+				continue;
+
 			symbol_conf.group_sort_idx = key - '0';
 
 			if (symbol_conf.group_sort_idx >= evsel->core.nr_members) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ