diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-06-20 17:58:19 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-22 08:56:35 -0400 |
commit | 89c7cb2cad5e5e3675df3ba1c12fe2f64dc691d6 (patch) | |
tree | 4fdff0f28232bf4ff7054c60658a0bff9956190f | |
parent | fcd864265028b65bf154f35fe5a17591ffd49cb9 (diff) |
perf hists: Enlarge pid sort entry size
The pid sort entry currently aligns pids with 5 digits, which is not
enough for current 4 million pids limit.
This leads to unaligned ':' header-data output when we display 7 digits
pid:
# Children Self Symbol Pid:Command
# ........ ........ ...................... .....................
#
0.12% 0.12% [.] 0x0000000000147e0f 2052894:krava
...
Adding 2 more digit to properly align the pid limit:
# Children Self Symbol Pid:Command
# ........ ........ ...................... .......................
#
0.12% 0.12% [.] 0x0000000000147e0f 2052894:krava
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1466459899-1166-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/hist.c | 2 | ||||
-rw-r--r-- | tools/perf/util/sort.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index d2647b1d82c0..d9826cce6801 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -79,7 +79,7 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h) | |||
79 | 79 | ||
80 | len = thread__comm_len(h->thread); | 80 | len = thread__comm_len(h->thread); |
81 | if (hists__new_col_len(hists, HISTC_COMM, len)) | 81 | if (hists__new_col_len(hists, HISTC_COMM, len)) |
82 | hists__set_col_len(hists, HISTC_THREAD, len + 6); | 82 | hists__set_col_len(hists, HISTC_THREAD, len + 8); |
83 | 83 | ||
84 | if (h->ms.map) { | 84 | if (h->ms.map) { |
85 | len = dso__name_len(h->ms.map->dso); | 85 | len = dso__name_len(h->ms.map->dso); |
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 896d34ebcc1e..a764139af485 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -79,8 +79,8 @@ static int hist_entry__thread_snprintf(struct hist_entry *he, char *bf, | |||
79 | { | 79 | { |
80 | const char *comm = thread__comm_str(he->thread); | 80 | const char *comm = thread__comm_str(he->thread); |
81 | 81 | ||
82 | width = max(7U, width) - 6; | 82 | width = max(7U, width) - 8; |
83 | return repsep_snprintf(bf, size, "%5d:%-*.*s", he->thread->tid, | 83 | return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid, |
84 | width, width, comm ?: ""); | 84 | width, width, comm ?: ""); |
85 | } | 85 | } |
86 | 86 | ||
@@ -95,7 +95,7 @@ static int hist_entry__thread_filter(struct hist_entry *he, int type, const void | |||
95 | } | 95 | } |
96 | 96 | ||
97 | struct sort_entry sort_thread = { | 97 | struct sort_entry sort_thread = { |
98 | .se_header = " Pid:Command", | 98 | .se_header = " Pid:Command", |
99 | .se_cmp = sort__thread_cmp, | 99 | .se_cmp = sort__thread_cmp, |
100 | .se_snprintf = hist_entry__thread_snprintf, | 100 | .se_snprintf = hist_entry__thread_snprintf, |
101 | .se_filter = hist_entry__thread_filter, | 101 | .se_filter = hist_entry__thread_filter, |