From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Dave Jones <davej@codemonkey.org.uk>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
linux-perf-users@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] perf hists: Do column alignment on the format iterator
Date: Fri, 12 Feb 2016 10:26:37 -0300 [thread overview]
Message-ID: <20160212132637.GL32168@kernel.org> (raw)
In-Reply-To: <20160212125622.GB16190@krava.redhat.com>
Em Fri, Feb 12, 2016 at 01:56:22PM +0100, Jiri Olsa escreveu:
> On Thu, Feb 11, 2016 at 05:27:18PM -0300, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
> > int column = 0;
> >
> > hist_browser__gotorc(browser, row, 0);
> >
> > hists__for_each_format(browser->hists, fmt) {
> > + struct perf_hpp hpp = {
> > + .buf = s,
> > + .size = sizeof(s),
> > + .ptr = &arg,
> > + };
> > +
> > if (perf_hpp__should_skip(fmt, entry->hists) ||
> > column++ < browser->b.horiz_scroll)
> > continue;
> > @@ -1122,8 +1123,9 @@ static int hist_browser__show_entry(struct hist_browser *browser,
> > if (fmt->color) {
> > width -= fmt->color(fmt, &hpp, entry);
> > } else {
> > - width -= fmt->entry(fmt, &hpp, entry);
> > + hist_entry__snprintf_alignment(entry, &hpp, fmt, fmt->entry(fmt, &hpp, entry));
> > ui_browser__printf(&browser->b, "%s", s);
> > + width -= hpp.buf - s;
>
> how's the 'color' case handled?
Right, I'll move it to after the branch.
- Arnaldo
next prev parent reply other threads:[~2016-02-12 13:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 20:27 [RFC PATCH] perf hists: Do column alignment on the format iterator Arnaldo Carvalho de Melo
2016-02-12 12:56 ` Jiri Olsa
2016-02-12 13:26 ` Arnaldo Carvalho de Melo [this message]
2016-02-12 15:50 ` Arnaldo Carvalho de Melo
2016-02-12 12:57 ` Jiri Olsa
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=20160212132637.GL32168@kernel.org \
--to=acme@kernel.org \
--cc=davej@codemonkey.org.uk \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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.