[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131217140608.GA29975@gmail.com>
Date: Tue, 17 Dec 2013 15:06:08 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Stanislav Fomichev <stfomichev@...dex-team.ru>,
linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
paulus@...ba.org, mingo@...hat.com, namhyung@...nel.org,
artagnon@...il.com, jolsa@...hat.com
Subject: Re: [PATCH 5/5 v2] perf timechart: add emphasize option
* Arnaldo Carvalho de Melo <acme@...stprotocols.net> wrote:
> Em Tue, Dec 17, 2013 at 02:41:37PM +0100, Ingo Molnar escreveu:
> > * Arnaldo Carvalho de Melo <acme@...stprotocols.net> 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=<duration_nsecs|task_name>::
> > > > 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.
Maybe --highlight ?
> 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.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists