aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-07-31 01:47:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-08-12 11:03:06 -0400
commitcf59002fdebc9c00ee29233e65bc39dd69e0eaf6 (patch)
tree459a91499433b17621bf402cdbefefc185ef5287 /tools/perf
parent5b5916696051b88e63f3726cc3db44bf9561bad9 (diff)
perf top: Add -w option for setting column width
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> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1406785662-5534-6-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Documentation/perf-report.txt2
-rw-r--r--tools/perf/Documentation/perf-top.txt6
-rw-r--r--tools/perf/builtin-top.c3
3 files changed, 10 insertions, 1 deletions
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
147-w:: 147-w::
148--column-widths=<width[,width...]>:: 148--column-widths=<width[,width...]>::
149 Force each column width to the provided list, for large terminal 149 Force each column width to the provided list, for large terminal
150 readability. 150 readability. 0 means no limit (default behavior).
151 151
152-t:: 152-t::
153--field-separator=:: 153--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.
193 sum of shown entries will be always 100%. "absolute" means it retains 193 sum of shown entries will be always 100%. "absolute" means it retains
194 the original value before and after the filter is applied. 194 the original value before and after the filter is applied.
195 195
196-w::
197--column-widths=<width[,width...]>::
198 Force each column width to the provided list, for large terminal
199 readability. 0 means no limit (default behavior).
200
201
196INTERACTIVE PROMPTING KEYS 202INTERACTIVE PROMPTING KEYS
197-------------------------- 203--------------------------
198 204
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)
1131 "Don't show entries under that percent", parse_percent_limit), 1131 "Don't show entries under that percent", parse_percent_limit),
1132 OPT_CALLBACK(0, "percentage", NULL, "relative|absolute", 1132 OPT_CALLBACK(0, "percentage", NULL, "relative|absolute",
1133 "How to display percentage of filtered entries", parse_filter_percentage), 1133 "How to display percentage of filtered entries", parse_filter_percentage),
1134 OPT_STRING('w', "column-widths", &symbol_conf.col_width_list_str,
1135 "width[,width...]",
1136 "don't try to adjust column width, use these fixed values"),
1134 OPT_END() 1137 OPT_END()
1135 }; 1138 };
1136 const char * const top_usage[] = { 1139 const char * const top_usage[] = {