[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140822080236.GB7714@gmail.com>
Date: Fri, 22 Aug 2014 10:02:36 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>, David Ahern <dsahern@...il.com>,
Andi Kleen <andi@...stfloor.org>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH v2 2/2] perf hists browser: Consolidate callchain print
functions in TUI
* Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> Em Thu, Aug 21, 2014 at 10:15:46AM +0900, Namhyung Kim escreveu:
> > Currently there're two callchain print functions in TUI - one for the
> > hists browser and another for file dump. They do almost same job so
> > it'd be better consolidate the codes.
>
> Some comments below, thanks for doing this work!
>
> > To do that, move row calculation code into a print callback so that
> > the dump code cannot be limited by the current screen size.
>
> > Cc: Frederic Weisbecker <fweisbec@...il.com>
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> > tools/perf/ui/browsers/hists.c | 210 +++++++++++++++--------------------------
> > 1 file changed, 76 insertions(+), 134 deletions(-)
> >
> > diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> > index 519353d9f5fb..48d8c8eee6c2 100644
> > --- a/tools/perf/ui/browsers/hists.c
> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -477,20 +477,32 @@ static char *callchain_list__sym_name(struct callchain_list *cl,
> > return bf;
> > }
> >
> > +struct callchain_print_arg {
> > + /* for hists browser */
> > + unsigned short row;
> > + off_t row_offset;
> > + bool is_current_entry;
> > +
> > + /* for file dump */
> > + FILE *fp;
> > + int printed;
> > +};
Just a data type definition nitpicking pet peeve of mine, don't
you guys too find this vertically aligned form infinitely more
readable:
struct callchain_print_arg {
/* for hists browser */
unsigned short row;
off_t row_offset;
bool is_current_entry;
/* for file dump */
FILE *fp;
int printed;
};
especially when looking at it via email, without syntax
highlighting?
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