* Arnaldo Carvalho de Melo <[email protected]> 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 <[email protected]>
> > Signed-off-by: Namhyung Kim <[email protected]>
> > ---
> >  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to