[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-89c7cb2cad5e5e3675df3ba1c12fe2f64dc691d6@git.kernel.org>
Date: Sun, 26 Jun 2016 03:52:36 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, jolsa@...nel.org, namhyung@...nel.org,
hpa@...or.com, dsahern@...il.com, acme@...hat.com,
a.p.zijlstra@...llo.nl, linux-kernel@...r.kernel.org,
tglx@...utronix.de
Subject: [tip:perf/core] perf hists: Enlarge pid sort entry size
Commit-ID: 89c7cb2cad5e5e3675df3ba1c12fe2f64dc691d6
Gitweb: http://git.kernel.org/tip/89c7cb2cad5e5e3675df3ba1c12fe2f64dc691d6
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Mon, 20 Jun 2016 23:58:19 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 22 Jun 2016 09:56:35 -0300
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@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1466459899-1166-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/hist.c | 2 +-
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 d2647b1..d9826cc 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)
len = thread__comm_len(h->thread);
if (hists__new_col_len(hists, HISTC_COMM, len))
- hists__set_col_len(hists, HISTC_THREAD, len + 6);
+ hists__set_col_len(hists, HISTC_THREAD, len + 8);
if (h->ms.map) {
len = dso__name_len(h->ms.map->dso);
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 896d34eb..a764139 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,
{
const char *comm = thread__comm_str(he->thread);
- width = max(7U, width) - 6;
- return repsep_snprintf(bf, size, "%5d:%-*.*s", he->thread->tid,
+ width = max(7U, width) - 8;
+ return repsep_snprintf(bf, size, "%7d:%-*.*s", he->thread->tid,
width, width, comm ?: "");
}
@@ -95,7 +95,7 @@ static int hist_entry__thread_filter(struct hist_entry *he, int type, const void
}
struct sort_entry sort_thread = {
- .se_header = " Pid:Command",
+ .se_header = " Pid:Command",
.se_cmp = sort__thread_cmp,
.se_snprintf = hist_entry__thread_snprintf,
.se_filter = hist_entry__thread_filter,
Powered by blists - more mailing lists