From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>
Subject: Re: [PATCH 4/5] perf ui/browser: Use perf_hpp__format functions
Date: Fri, 7 Sep 2012 17:32:18 -0700 [thread overview]
Message-ID: <20120908003218.GC20401@ghostprotocols.net> (raw)
In-Reply-To: <1346640790-17197-5-git-send-email-namhyung@kernel.org>
Em Mon, Sep 03, 2012 at 11:53:09AM +0900, Namhyung Kim escreveu:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> Override hpp->color functions for TUI. Because line coloring is done
> outside of the function, it just sets the percent value and pass it.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/ui/browsers/hists.c | 94 ++++++++++++++++++++++++++++++++----------
> tools/perf/ui/tui/setup.c | 4 ++
> 2 files changed, 76 insertions(+), 22 deletions(-)
>
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 81bd8c2af730..144d7be2872e 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -28,6 +28,8 @@ struct hist_browser {
> bool has_symbols;
> };
>
> +extern void hist_browser__init_hpp(void);
I folded the patch below so that we have the lines starting at column 1
like before, i.e. we were using " %5.2f" for the overhead and now you
changed it to "%5.2f".
- Arnaldo
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 144d7be..5a5739b 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -605,7 +605,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
char s[256];
double percent;
int i, printed = 0;
- int width = browser->b.width;
+ int width = browser->b.width - 1;
char folded_sign = ' ';
bool current_entry = ui_browser__is_current_entry(&browser->b, row);
off_t row_offset = entry->row_offset;
@@ -627,7 +627,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
.total_period = browser->hists->stats.total_period,
};
- ui_browser__gotorc(&browser->b, row, 0);
+ ui_browser__gotorc(&browser->b, row, 1);
for (i = 0; i < PERF_HPP__MAX_INDEX; i++) {
if (!perf_hpp__format[i].cond)
next prev parent reply other threads:[~2012-09-08 0:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 2:53 [PATCHSET RESEND 0/5] perf tools: Cleanup hist printing code (v4) Namhyung Kim
2012-09-03 2:53 ` [PATCH 1/5] perf hists: Introduce perf_hpp for hist period printing Namhyung Kim
2012-09-09 8:54 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-09-12 17:26 ` Robert Richter
2012-09-12 18:48 ` Arnaldo Carvalho de Melo
2012-09-13 2:43 ` Namhyung Kim
2012-09-13 3:51 ` Arnaldo Carvalho de Melo
2012-09-13 4:14 ` [PATCH] perf record: Add missing perf_hpp__init for pipe-mode Namhyung Kim
2012-09-13 4:21 ` Namhyung Kim
2012-09-13 9:48 ` Robert Richter
2012-09-19 15:25 ` [tip:perf/core] perf report: " tip-bot for Namhyung Kim
2012-09-03 2:53 ` [PATCH 2/5] perf hists: Handle field separator properly Namhyung Kim
2012-09-09 8:55 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-09-03 2:53 ` [PATCH 3/5] perf hists: Use perf_hpp__format->width to calculate the column widths Namhyung Kim
2012-09-09 8:56 ` [tip:perf/core] perf hists: Use perf_hpp__format-> width " tip-bot for Namhyung Kim
2012-09-03 2:53 ` [PATCH 4/5] perf ui/browser: Use perf_hpp__format functions Namhyung Kim
2012-09-08 0:32 ` Arnaldo Carvalho de Melo [this message]
2012-09-08 14:05 ` Namhyung Kim
2012-09-12 6:25 ` Namhyung Kim
2012-09-09 8:57 ` [tip:perf/core] perf hists browser: " tip-bot for Namhyung Kim
2012-09-03 2:53 ` [PATCH 5/5] perf gtk/browser: " Namhyung Kim
2012-09-09 8:58 ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-09-08 0:48 ` [PATCHSET RESEND 0/5] perf tools: Cleanup hist printing code (v4) Arnaldo Carvalho de Melo
2012-09-08 14:00 ` Namhyung Kim
2012-09-08 15:08 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2012-08-22 5:48 [PATCH " Namhyung Kim
2012-08-22 5:48 ` [PATCH 4/5] perf ui/browser: Use perf_hpp__format functions Namhyung Kim
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=20120908003218.GC20401@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).