[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1f18601-41d5-451d-4278-b7adb08674c3@linux.intel.com>
Date: Thu, 19 Dec 2019 20:38:39 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.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 12/19/2019 5:10 PM, Jiri Olsa wrote:
> 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) {
>
Hi Jiri,
Thanks, I think it's a good improvement. It can avoid the unnecessary
refresh.
If no more comments on this patch-set, I will add this improvement and
then post v6.
Thanks
Jin Yao
Powered by blists - more mailing lists