From: Ingo Molnar <mingo@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH v2 2/2] perf hists browser: Consolidate callchain print functions in TUI
Date: Fri, 22 Aug 2014 10:02:36 +0200 [thread overview]
Message-ID: <20140822080236.GB7714@gmail.com> (raw)
In-Reply-To: <20140821154353.GL2892@kernel.org>
* Arnaldo Carvalho de Melo <acme@kernel.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@gmail.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.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
next prev parent reply other threads:[~2014-08-22 8:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 1:15 [PATCHSET 0/2] perf hists browser: Cleanup callchain routines (v2) Namhyung Kim
2014-08-21 1:15 ` [PATCH v2 1/2] perf hists browser: Cleanup callchain print functions Namhyung Kim
2014-08-24 14:58 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-21 1:15 ` [PATCH v2 2/2] perf hists browser: Consolidate callchain print functions in TUI Namhyung Kim
2014-08-21 15:43 ` Arnaldo Carvalho de Melo
2014-08-22 8:02 ` Ingo Molnar [this message]
2014-08-22 14:47 ` Arnaldo Carvalho de Melo
2014-08-21 8:11 ` [PATCHSET 0/2] perf hists browser: Cleanup callchain routines (v2) Jiri Olsa
2014-08-21 15:25 ` Arnaldo Carvalho de Melo
2014-08-22 8:03 ` Ingo Molnar
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=20140822080236.GB7714@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.