From: Jiri Olsa <jolsa@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 1/3] perf tools tui: Remove width setting from hist_browser__refresh_dimensions
Date: Fri, 27 Jun 2014 18:26:56 +0200 [thread overview]
Message-ID: <1403886418-5556-2-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1403886418-5556-1-git-send-email-jolsa@kernel.org>
We always use the full width of the screen, so just use the
detected width. Calling ui_browser__refresh_dimensions to
get the current terminal screen scale.
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/ui/browsers/hists.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 2185091..8102f45 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -58,9 +58,7 @@ static u32 hist_browser__nr_entries(struct hist_browser *hb)
static void hist_browser__refresh_dimensions(struct hist_browser *browser)
{
- /* 3 == +/- toggle symbol before actual hist_entry rendering */
- browser->b.width = 3 + (hists__sort_list_width(browser->hists) +
- sizeof("[k]"));
+ ui_browser__refresh_dimensions(&browser->b);
}
static void hist_browser__reset(struct hist_browser *browser)
--
1.8.3.1
next prev parent reply other threads:[~2014-06-27 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 16:26 [PATCHv4 0/3] perf tools tui: Display columns headers Jiri Olsa
2014-06-27 16:26 ` Jiri Olsa [this message]
2014-06-27 16:26 ` [PATCH 2/3] perf tools tui: Display columns header text on 'H' press Jiri Olsa
2014-06-27 16:26 ` [PATCH 3/3] perf tools: Add ui.show-headers config file option Jiri Olsa
2014-06-30 11:13 ` Namhyung Kim
2014-06-30 18:07 ` Jiri Olsa
2014-07-16 19:15 ` [tip:perf/core] perf hists browser: " tip-bot for 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=1403886418-5556-2-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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
Powered by JetHome