mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Ingo Molnar <mingo@kernel.org>
Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>,
	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
Date: Tue, 17 Dec 2013 11:15:32 -0300	[thread overview]
Message-ID: <20131217141532.GC6517@ghostprotocols.net> (raw)
In-Reply-To: <20131217140608.GA29975@gmail.com>

Em Tue, Dec 17, 2013 at 03:06:08PM +0100, Ingo Molnar escreveu:
> * Arnaldo Carvalho de Melo <acme@ghostprotocols.net> wrote:
> > Em Tue, Dec 17, 2013 at 02:41:37PM +0100, Ingo Molnar escreveu:
> > > * Arnaldo Carvalho de Melo <acme@ghostprotocols.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.

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

  reply	other threads:[~2013-12-17 14:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 14:37 [PATCH 0/5] perf timechart improvements part 2 Stanislav Fomichev
2013-12-02 14:37 ` [PATCH 1/5] perf timechart: add backtrace support to CPU info Stanislav Fomichev
2013-12-18 10:30   ` [tip:perf/core] perf timechart: Add " tip-bot for Stanislav Fomichev
2013-12-02 14:37 ` [PATCH 2/5] perf timechart: print pid along the name Stanislav Fomichev
2013-12-18 10:30   ` [tip:perf/core] perf timechart: Print " tip-bot for Stanislav Fomichev
2013-12-02 14:37 ` [PATCH 3/5] perf timechart: get number of CPUs from perf header Stanislav Fomichev
2013-12-18 10:31   ` [tip:perf/core] perf timechart: Get " tip-bot for Stanislav Fomichev
2013-12-02 14:37 ` [PATCH 4/5] perf timechart: add support for topology Stanislav Fomichev
2013-12-18 10:31   ` [tip:perf/core] perf timechart: Add " tip-bot for Stanislav Fomichev
2013-12-16 19:38 ` [PATCH 0/5] perf timechart improvements part 2 Arnaldo Carvalho de Melo
2013-12-17  9:38   ` [PATCH 5/5] perf timechart: add emphasize option Stanislav Fomichev
2013-12-17 11:23     ` Ingo Molnar
2013-12-17 12:15       ` [PATCH 5/5 v2] " Stanislav Fomichev
2013-12-17 13:12         ` Ingo Molnar
2013-12-17 13:38         ` Arnaldo Carvalho de Melo
2013-12-17 13:41           ` Ingo Molnar
2013-12-17 13:59             ` Arnaldo Carvalho de Melo
2013-12-17 14:06               ` Ingo Molnar
2013-12-17 14:15                 ` Arnaldo Carvalho de Melo [this message]
2013-12-17 14:26                   ` Ingo Molnar
2013-12-17 15:03                   ` David Ahern
2013-12-17 15:53                   ` Stanislav Fomichev
2013-12-18 10:33                     ` [tip:perf/core] perf timechart: Add --highlight option tip-bot for Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131217141532.GC6517@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=artagnon@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=stfomichev@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome