Skip to content

Commit

Permalink
perf hists browser: Left justify column headers
Browse files Browse the repository at this point in the history
Looks better and avoids it moving to the end of the screen as the column
width changes over time in 'perf top'.

Cc: Adrian Hunter <adrian.hunter@intel.com>
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: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-yc144ai5jye3yl3h5yxw0scd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 7, 2014
1 parent c830236 commit 1561880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ static int __sort__hpp_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
hse = container_of(fmt, struct hpp_sort_entry, hpp);
len = hists__col_len(&evsel->hists, hse->se->se_width_idx);

return scnprintf(hpp->buf, hpp->size, "%*s", len, hse->se->se_header);
return scnprintf(hpp->buf, hpp->size, "%-*s", len, hse->se->se_header);
}

static int __sort__hpp_width(struct perf_hpp_fmt *fmt,
Expand Down

0 comments on commit 1561880

Please sign in to comment.