From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934554AbbHLJPM (ORCPT ); Wed, 12 Aug 2015 05:15:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50066 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934012AbbHLJPF (ORCPT ); Wed, 12 Aug 2015 05:15:05 -0400 Date: Wed, 12 Aug 2015 11:15:01 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , David Ahern , Andi Kleen Subject: Re: [PATCH v2 1/2] perf hists browser: Support horizontal scrolling with '<' and '>' key Message-ID: <20150812091501.GA6896@krava.brq.redhat.com> References: <20150809103542.GA3415@danjae.kornet> <20150809112139.GD17069@krava.brq.redhat.com> <20150810155004.GB2521@kernel.org> <20150810224603.GC27431@krava.redhat.com> <20150810225822.GH2521@kernel.org> <20150810230256.GA27382@krava.redhat.com> <20150810231445.GI2521@kernel.org> <20150810231559.GB27382@krava.redhat.com> <20150811205928.GA31059@kernel.org> <20150812054120.GA25642@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150812054120.GA25642@sejong> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2015 at 02:41:22PM +0900, Namhyung Kim wrote: SNIP > > > > Several lines are just comments explaining some tricks due to me not > > having found a counter for the number of colums somewhere and reusing > > the first loop that traverses them all to do the counting. > > > > There are two before those that at first I thought was needed, but ended > > up not using (would have to render the whole line in ui_browser to do > > the scrolling at line printing time, works only for browsers where just > > one call to ui_browser__printf or ui_browser__write_nstring is done, > > but I ended up leaving it there anyway, to try to make the > > hist_browser.c and other ui_browser implementations (annotate, etc) > > independent of libslang: > > > > $ git log --oneline | head -4 | tail -2 > > e7534e88dfa3 perf ui browser: Introduce ui_browser__printf() > > 2fe0f7e4b73e perf ui browser: Introduce ui_browser__write_nstring() > > $ > > > > Tested it with 'perf mem record -g -a' + 'perf mem report', and I liked > > how it works, please check if you like it too :-) > > > > The <- and -> keys are reused just when the horizontal scrolling mode is > > activate by setting ui_browser->columns, the hists_browser (perf report, > > perf top) will continue having ENTER and ESC, as always, to > > select/deselect things. > > Currently the help message in the hist browser says the arrows keys > are used to zoom in & out and ESC is for 'exit browser'. Do you think > it's ok to change the current behavior? I have some concern here as well.. but let's try and see ;-) but if we go this way I think I'd slighly prefer following behaviour: arrows : scroll by 1 column SHIFT-arrows : scroll by sort column but it's just a suggestion, I like your change as it is now as well thanks, jirka