From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
Namhyung Kim <namhyung@kernel.org>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 5/6] perf top: Add -w option for setting column width
Date: Wed, 9 Jul 2014 14:28:13 +0900 [thread overview]
Message-ID: <1404883694-5342-6-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1404883694-5342-1-git-send-email-namhyung@kernel.org>
Add -w/--column-widths option like perf report does so that users are
able to see symbols even with some very long C++ library/functions.
It can be a list separated by comma for each column.
$ perf top -w 0,20,30
The value of 0 means there's no limit.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Documentation/perf-report.txt | 2 +-
tools/perf/Documentation/perf-top.txt | 6 ++++++
tools/perf/builtin-top.c | 3 +++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index d2b59af62bc0..d561e0214f52 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -147,7 +147,7 @@ OPTIONS
-w::
--column-widths=<width[,width...]>::
Force each column width to the provided list, for large terminal
- readability.
+ readability. 0 means no limit (default behavior).
-t::
--field-separator=::
diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 180ae02137a5..28fdee394880 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -193,6 +193,12 @@ Default is to monitor all CPUS.
sum of shown entries will be always 100%. "absolute" means it retains
the original value before and after the filter is applied.
+-w::
+--column-widths=<width[,width...]>::
+ Force each column width to the provided list, for large terminal
+ readability. 0 means no limit (default behavior).
+
+
INTERACTIVE PROMPTING KEYS
--------------------------
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 377971dc89a3..bde216b2071c 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1131,6 +1131,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
"Don't show entries under that percent", parse_percent_limit),
OPT_CALLBACK(0, "percentage", NULL, "relative|absolute",
"How to display percentage of filtered entries", parse_filter_percentage),
+ OPT_STRING('w', "column-widths", &symbol_conf.col_width_list_str,
+ "width[,width...]",
+ "don't try to adjust column width, use these fixed values"),
OPT_END()
};
const char * const top_usage[] = {
--
2.0.0
next prev parent reply other threads:[~2014-07-09 5:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 5:28 [PATCHSET 0/6] perf tools: Honor column width setting Namhyung Kim
2014-07-09 5:28 ` [PATCH 1/6] perf tools: Left-align output contents Namhyung Kim
2014-07-09 5:28 ` [PATCH 2/6] perf tools: Make __hpp__fmt() receive an additional len argument Namhyung Kim
2014-07-09 5:28 ` [PATCH 3/6] perf tools: Save column length in perf_hpp_fmt Namhyung Kim
2014-07-24 12:10 ` Jiri Olsa
2014-07-24 15:46 ` Namhyung Kim
2014-07-24 15:58 ` Jiri Olsa
2014-07-09 5:28 ` [PATCH 4/6] perf report: Honor column width setting Namhyung Kim
2014-07-24 12:47 ` Jiri Olsa
2014-07-24 15:51 ` Namhyung Kim
2014-07-24 12:57 ` Jiri Olsa
2014-07-24 13:57 ` Arnaldo Carvalho de Melo
2014-07-24 14:49 ` Jiri Olsa
2014-07-24 15:41 ` Namhyung Kim
2014-07-24 15:58 ` Jiri Olsa
2014-07-24 19:14 ` Arnaldo Carvalho de Melo
2014-07-09 5:28 ` Namhyung Kim [this message]
2014-07-09 5:28 ` [PATCH 6/6] perf tools: Add name field into perf_hpp_fmt Namhyung Kim
2014-07-21 9:07 ` [PATCHSET 0/6] perf tools: Honor column width setting Jiri Olsa
2014-07-23 7:40 ` Namhyung Kim
2014-07-24 13:11 ` Jiri Olsa
2014-07-24 13:59 ` Arnaldo Carvalho de Melo
2014-07-24 15:42 ` 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=1404883694-5342-6-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--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