diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-11-19 00:02:51 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-11-19 18:33:48 +0300 |
commit | b2d53671cdb0cf5070d56359821eb812669bb1ad (patch) | |
tree | 5e7cdab823d3a6094b7473a26c26ccf32a2c20ae /tools | |
parent | e592488c01d51763de847fcecb3d969231a483a9 (diff) | |
download | linux-b2d53671cdb0cf5070d56359821eb812669bb1ad.tar.xz |
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@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-2xnt0vqkoox52etq2qhyetr0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/sort.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 9402885a77f3..82a5596241a7 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 = { |