Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2588335rwd; Mon, 15 May 2023 13:58:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7k3oT1MGUTrCyjBWAkhupsKckslHDGdmab3dGQQNcw91/MWj2CMhzTAPOkPDSAo8dN1k65 X-Received: by 2002:a05:6a20:7fa5:b0:f0:eb30:d49e with SMTP id d37-20020a056a207fa500b000f0eb30d49emr44659290pzj.39.1684184320566; Mon, 15 May 2023 13:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684184320; cv=none; d=google.com; s=arc-20160816; b=Hvnq3ABoNEjgxqWwWbgcR9GjUraj8hwzMO4PCFiOdWnXGTs9DIw6AQqWvCrAoP8VJ3 mL9MqrhL3j5cXPHHNp67BCvU5WQBzZfYgSPENFwQ5zamvP+NadplqpZSyLFCqpTf/15x KtiT31AQ4iYCYhYWDnBKBAhuSonSp3eOQxJD6bBxdFxiVPPfTBkIwgR0h5ee+SUatodM ZdZmDkcSU2TkfGouI92kYCB9z1QR/3ihtHF3OvNhBddPw1okFihMkFH65stro2cKEcg/ Z/v2DprD3ljKbx8COcWFPm8WDEEXorIE/4VlItyqtBHOWpFukpqpWa5/cM+HqK7pOxAI mU0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=q2zNMq7nSw451jS+4WkGIkPjir8W0yv402WwXbS/g8E=; b=rOURWrKyFHdkGXGcXSR4tUf9SJpEKyHbfhbz4n+PHwo6p8WXm1QgU0m5HJkDJbWNfo Fv3H7+yI3oi7DKoItGR90WnFmQGas7H2vPDR2IVmMPTbB1IpGBgZUfX4gH7thVWNuVkF olq/bEDQSNyytjfqt3NP5lW3qhPJ4fOynyqYDNbMvzKmqb2Oo7leTMh6cwJEsquuNceh uGioL99AzxS3ek5EZaRovhYlfEFzpyDU/VBC7xuOHhBKjDsMGZdJbjf19yVnfQjtEp+e RpGfqova42JYd/NjVuy1x0fmGbUyQwSRikATo7A+o2iVkDlkIgXaQVkzzvDbXEWKot+s g2zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IwYgj53V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b00514329f7ebdsi16398710pgd.344.2023.05.15.13.58.03; Mon, 15 May 2023 13:58:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IwYgj53V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245230AbjEOUy1 (ORCPT + 99 others); Mon, 15 May 2023 16:54:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244817AbjEOUyZ (ORCPT ); Mon, 15 May 2023 16:54:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7349EDF; Mon, 15 May 2023 13:54:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 29B4B624D3; Mon, 15 May 2023 20:54:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B276C433D2; Mon, 15 May 2023 20:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684184062; bh=n9VyGRNUJDkLTEUulgC2aa9ObEOGijpX7zOS2WKs5FY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IwYgj53VUTN3MX6a4+0pmH6Lz2xdtgiknjyMyyAsTvtVdi3EuKM5zLb4VKYdh0umv pXAQtvVZl6Rw+UgeaH5dImJzLRbwxldjKukRp/zxG8xnYCBV2nMcQzZQbZhAaWr6ul pa4OL+NIteBWG2xMJnXVeiDDoyn7wbaq1RlCesiS67bhD0Qf1zSC7ry9/nuPbUPaNq bE5WEa24R4XEfMjn0uQZyvijvgp6lLYcJt7LdV02tROrZbYLDZNvhiUyD/1c/rs+8D hO9LTDSyJGMsi+wJK8L1Em3l1V0GIvrPHEFzZ0nikQS/unA2zWsVVOlhxaLUIEIdGL SfqLnF8iyrQrQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id DCD22403B5; Mon, 15 May 2023 17:54:19 -0300 (-03) Date: Mon, 15 May 2023 17:54:19 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Namhyung Kim , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation Message-ID: References: <20230511062725.514752-1-namhyung@kernel.org> <20230511062725.514752-3-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, May 15, 2023 at 10:09:08AM -0700, Ian Rogers escreveu: > On Wed, May 10, 2023 at 11:27 PM Namhyung Kim wrote: > > > > The hists__find_annotations() allow to move to next or previous symbols > > for annotation using the arrow keys. But TUI annotate_browser__run() > > uses the RIGHT key as ENTER to handle jump/call instructions. That > > makes the navigation to the next function impossible. > > > > I'd like to change it back to move the next symbol but I'm afraid if > > some users get confused. So I added a new pair of keys to handle that. > > > > Signed-off-by: Namhyung Kim > > Acked-by: Ian Rogers > > Thanks, > Ian > > > --- > > tools/perf/builtin-annotate.c | 4 +++- > > tools/perf/ui/browsers/annotate.c | 4 +++- > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c > > index 63cdf6ea6f6d..425a7e2fd6fb 100644 > > --- a/tools/perf/builtin-annotate.c > > +++ b/tools/perf/builtin-annotate.c > > @@ -342,7 +342,7 @@ static void hists__find_annotations(struct hists *hists, > > notes = symbol__annotation(he->ms.sym); > > if (notes->src == NULL) { > > find_next: > > - if (key == K_LEFT) > > + if (key == K_LEFT || key == '<') > > nd = rb_prev(nd); > > else > > nd = rb_next(nd); > > @@ -378,9 +378,11 @@ static void hists__find_annotations(struct hists *hists, > > return; > > /* fall through */ > > case K_RIGHT: > > + case '>': > > next = rb_next(nd); > > break; > > case K_LEFT: > > + case '<': > > next = rb_prev(nd); > > break; > > default: > > diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c > > index 12c3ce530e42..70bad42b807b 100644 > > --- a/tools/perf/ui/browsers/annotate.c > > +++ b/tools/perf/ui/browsers/annotate.c > > @@ -781,9 +781,9 @@ static int annotate_browser__run(struct annotate_browser *browser, > > ui_browser__help_window(&browser->b, > > "UP/DOWN/PGUP\n" > > "PGDN/SPACE Navigate\n" > > + " Move to prev/next symbol\n" > > "q/ESC/CTRL+C Exit\n\n" > > "ENTER Go to target\n" > > - "ESC Exit\n" I think the two above were unintentional? I'm removing this hunk. - Arnaldo > > "H Go to hottest instruction\n" > > "TAB/shift+TAB Cycle thru hottest instructions\n" > > "j Toggle showing jump to target arrows\n" > > @@ -913,6 +913,8 @@ static int annotate_browser__run(struct annotate_browser *browser, > > annotation__toggle_full_addr(notes, ms); > > continue; > > case K_LEFT: > > + case '<': > > + case '>': > > case K_ESC: > > case 'q': > > case CTRL('c'): > > -- > > 2.40.1.521.gf1e218fcd8-goog > > -- - Arnaldo