diff options
author | Namhyung Kim <namhyung@kernel.org> | 2016-09-20 07:30:24 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-09-20 21:13:37 +0200 |
commit | e3b60bc93d81e0542ac433df226b8de8b963533e (patch) | |
tree | cf0fb6858530dd6f9ca1b3ca2728cb3d369bc2a4 /tools/perf/ui/stdio | |
parent | perf ui/tui: Reset output width for hierarchy (diff) | |
download | linux-e3b60bc93d81e0542ac433df226b8de8b963533e.tar.xz linux-e3b60bc93d81e0542ac433df226b8de8b963533e.zip |
perf hists: Factor out hists__reset_column_width()
The stdio and tui has same code to reset hpp format column width.
Factor it out as a new function.
Suggested-and-Acked-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160920053025.13989-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/stdio')
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index a57131e61fe3..8e1840bff29d 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c @@ -717,8 +717,6 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, int max_cols, float min_pcnt, FILE *fp, bool use_callchain) { - struct perf_hpp_fmt *fmt; - struct perf_hpp_list_node *node; struct rb_node *nd; size_t ret = 0; const char *sep = symbol_conf.field_sep; @@ -729,13 +727,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, init_rem_hits(); - hists__for_each_format(hists, fmt) - perf_hpp__reset_width(fmt, hists); - /* hierarchy entries have their own hpp list */ - list_for_each_entry(node, &hists->hpp_formats, list) { - perf_hpp_list__for_each_format(&node->hpp, fmt) - perf_hpp__reset_width(fmt, hists); - } + hists__reset_column_width(hists); if (symbol_conf.col_width_list_str) perf_hpp__set_user_width(symbol_conf.col_width_list_str); |