Skip to content

Commit cf59002

Browse files
namhyungacmel
authored andcommitted
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>
1 parent 5b59166 commit cf59002

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎tools/perf/Documentation/perf-report.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ OPTIONS
147147
-w::
148148
--column-widths=<width[,width...]>::
149149
Force each column width to the provided list, for large terminal
150-
readability.
150+
readability. 0 means no limit (default behavior).
151151

152152
-t::
153153
--field-separator=::

‎tools/perf/Documentation/perf-top.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ Default is to monitor all CPUS.
193193
sum of shown entries will be always 100%. "absolute" means it retains
194194
the original value before and after the filter is applied.
195195

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+
196202
INTERACTIVE PROMPTING KEYS
197203
--------------------------
198204

‎tools/perf/builtin-top.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
11311131
"Don't show entries under that percent", parse_percent_limit),
11321132
OPT_CALLBACK(0, "percentage", NULL, "relative|absolute",
11331133
"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"),
11341137
OPT_END()
11351138
};
11361139
const char * const top_usage[] = {

0 commit comments

Comments
 (0)