[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-2xnt0vqkoox52etq2qhyetr0@git.kernel.org>
Date: Wed, 19 Nov 2014 23:39:15 -0800
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dzickus@...hat.com, linux-kernel@...r.kernel.org,
eranian@...gle.com, peterz@...radead.org, hpa@...or.com,
efault@....de, bp@...e.de, tglx@...utronix.de, dsahern@...il.com,
jolsa@...hat.com, mingo@...nel.org, acme@...hat.com,
adrian.hunter@...el.com, andi@...stfloor.org, fweisbec@...il.com,
namhyung@...nel.org
Subject: [tip:perf/core] perf hists:
Fix up srcline histogram key formatting
Commit-ID: b2d53671cdb0cf5070d56359821eb812669bb1ad
Gitweb: http://git.kernel.org/tip/b2d53671cdb0cf5070d56359821eb812669bb1ad
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 18 Nov 2014 18:02:51 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 19 Nov 2014 12:33:48 -0300
perf hists: Fix up srcline histogram key formatting
Problem introduced in:
commit 5b5916696051 "perf report: Honor column width setting"
Where the left justification signal was after the width, which ended up,
when the width was, say, 11, always printing:
%11.11-s
Instead of src:line left justified and limited to 11 chars.
Resulting in a like:
70.93% %11.11-s [.] f2 tcall
When it should instead be:
70.93% tcall.c:5 [.] f2 tcall
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Borislav Petkov <bp@...e.de>
Cc: David Ahern <dsahern@...il.com>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Mike Galbraith <efault@....de>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-2xnt0vqkoox52etq2qhyetr0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/sort.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 9402885..82a5596 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -309,7 +309,7 @@ sort__srcline_cmp(struct hist_entry *left, struct hist_entry *right)
static int hist_entry__srcline_snprintf(struct hist_entry *he, char *bf,
size_t size, unsigned int width)
{
- return repsep_snprintf(bf, size, "%*.*-s", width, width, he->srcline);
+ return repsep_snprintf(bf, size, "%-*.*s", width, width, he->srcline);
}
struct sort_entry sort_srcline = {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists