Re: [patch] perf tools: allow top users to switch between weighted and individual counter display

Ingo Molnar
2009-08-04T08:56:21Z

* Mike Galbraith <efault@gmx.de> wrote:

> On Tue, 2009-08-04 at 10:32 +0200, Ingo Molnar wrote:
> > * Mike Galbraith <efault@gmx.de> wrote:
> >
> > > On Mon, 2009-08-03 at 07:09 +0200, Mike Galbraith wrote:
> > >
> > > > Not sure I like waiting for input at start though, maybe just
> > > > display and sleep a couple seconds would be friendlier.
> > >
> > > I find both really annoying, so just go straight into displaying.
> > > That kind of usage information belongs in the man page. I've
> > > updated same to reflect the current implementation, and will
> > > submit separately.
> >
> > yeah - will apply both patches, thanks Mike.
>
> Thanks.
>
> > I'm wondering, have you seen the 'tig' tool before? It puts the
> > console into raw mode too and has a rather pleasant text interface.
> > Since it's a relatively young project it might have a compact code
> > base that could be imported (assuming the license is compatible and
> > assuming what i say is true - have not checked yet).
>
> No, I haven't. I'll take a look (time time time) though, because
> I'd like to make top fully interactive, and my code is... um er,
> somewhat crude :)

it's at:

git clone http://jonas.nitro.dk/tig/tig.git

7 KLOC and clean looking. Code seems quite readable and in standard
Git style - i.e. kernel and tools/perf/ compatible. License is GPLv2
or later - i.e. that too is kernel compatible.

The tig.c is a bit large at 7000+ lines, but it looks easily split.
It uses libcurses for console handling.

Looks like a pretty good starting point IMO.

Ingo