From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900Ab3LQOPq (ORCPT ); Tue, 17 Dec 2013 09:15:46 -0500 Received: from mail-qe0-f49.google.com ([209.85.128.49]:46540 "EHLO mail-qe0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753668Ab3LQOPo (ORCPT ); Tue, 17 Dec 2013 09:15:44 -0500 Date: Tue, 17 Dec 2013 11:15:32 -0300 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Stanislav Fomichev , linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com, namhyung@kernel.org, artagnon@gmail.com, jolsa@redhat.com Subject: Re: [PATCH 5/5 v2] perf timechart: add emphasize option Message-ID: <20131217141532.GC6517@ghostprotocols.net> References: <1385995056-20158-1-git-send-email-stfomichev@yandex-team.ru> <20131216193800.GA19283@ghostprotocols.net> <20131217093855.GA3345@stfomichev-desktop> <20131217112303.GB27791@gmail.com> <20131217121522.GA6357@stfomichev-desktop> <20131217133821.GA6517@ghostprotocols.net> <20131217134137.GA29396@gmail.com> <20131217135923.GB6517@ghostprotocols.net> <20131217140608.GA29975@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131217140608.GA29975@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Dec 17, 2013 at 03:06:08PM +0100, Ingo Molnar escreveu: > * Arnaldo Carvalho de Melo wrote: > > Em Tue, Dec 17, 2013 at 02:41:37PM +0100, Ingo Molnar escreveu: > > > * Arnaldo Carvalho de Melo wrote: > > > > Em Tue, Dec 17, 2013 at 04:15:22PM +0400, Stanislav Fomichev escreveu: > > > > > > Please give a sample usage command line and a sample output. (the > > > > > > highlighting can be done using ASCII escape sequences in the changelog > > > > > > as well.) > > > > > Highlighting is done in the generated SVG, so I can't really show it in > > > > > the log or documentation. But I added simple example with -e option. > > > > > > -e:: > > > > > > --emphasize=:: > > > > > Thanks, added. > > > > I also wonder how to allocate single letter options here... can we live > > > > with just --emphasize for now? Wouldn't at some point we maybe want to > > > > use -e in 'perf timechart' to pick some specific event, and then, to > > > > make it consistent with the other tools, -e would then be used? > > > I wanted to raise a similar argument too - so if we don't have to do > > > -e then maybe '--grep' would be the better option name? > > > If it becomes popular then the pattern matching can be improved, > > > without having to change the option name and such. > > Humm, 'grep' is a filter, i.e. something that removes parts of the > > data being perused, while this case it will not filter anything, it > > will just make something that matches some search criteria to stand > > out from the rest, that is still there, so perhaps --emphasize is Ok > > albeit kinda long... > > So I frequently use grep with -C 1000 --color=always to also show the > context. But --grep-context sounds too long. Just tried it here, and on fedora 18 one doesn't even needs the --color=always, but then basic grep usage doesn't imply showing contexts and highlighting, i.e. grep grew into a swiss knife, like many others :-\ > Maybe --highlight ? That is ok for me, I think it is better than --emphasize > > Do we have any other command line tool that has a long standing > > semantics of "highlighting" or "emphasizing" parts of a data stream? > > Yeah, grep's -C, -A, -B options. (--context, --context-after, > --context-before), combined with the --color option to highlight. I don't feel like there is a direct mapping of what he wants to achieve to reusing the 'grep' keyword, at least it didn't sound natural at first sight to me. :-) - Arnaldo