[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-dccf180542c4e27621ea526769014dc97b9e5676@git.kernel.org>
Date: Fri, 25 Jan 2013 03:41:11 -0800
From: tip-bot for Namhyung Kim <namhyung.kim@....com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, eranian@...gle.com,
paulus@...ba.org, hpa@...or.com, mingo@...nel.org,
a.p.zijlstra@...llo.nl, namhyung.kim@....com, namhyung@...nel.org,
jolsa@...hat.com, dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf sort: Align cpu column to right
Commit-ID: dccf180542c4e27621ea526769014dc97b9e5676
Gitweb: http://git.kernel.org/tip/dccf180542c4e27621ea526769014dc97b9e5676
Author: Namhyung Kim <namhyung.kim@....com>
AuthorDate: Thu, 27 Dec 2012 18:11:41 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 24 Jan 2013 16:40:22 -0300
perf sort: Align cpu column to right
Since cpu number is a natural number, it'd be more appropriate
aligning it to right.
Before:
# Overhead CPU Command: Pid Shared Object
# ........ ... ................. .....................
#
8.91% 8 gnome-shell: 1497 perf-1497.map
8.90% 7 gnome-shell: 1497 perf-1497.map
8.86% 9 gnome-shell: 1497 perf-1497.map
8.83% 6 gnome-shell: 1497 perf-1497.map
8.81% 10 gnome-shell: 1497 perf-1497.map
7.44% 5 gnome-shell: 1497 perf-1497.map
6.20% 3 gnome-shell: 1497 perf-1497.map
5.10% 0 gnome-shell: 1497 perf-1497.map
After:
# Overhead CPU Command: Pid Shared Object
# ........ ... ................. .....................
#
8.91% 8 gnome-shell: 1497 perf-1497.map
8.90% 7 gnome-shell: 1497 perf-1497.map
8.86% 9 gnome-shell: 1497 perf-1497.map
8.83% 6 gnome-shell: 1497 perf-1497.map
8.81% 10 gnome-shell: 1497 perf-1497.map
7.44% 5 gnome-shell: 1497 perf-1497.map
6.20% 3 gnome-shell: 1497 perf-1497.map
5.10% 0 gnome-shell: 1497 perf-1497.map
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Acked-by: Jiri Olsa <jolsa@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1356599507-14226-5-git-send-email-namhyung@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 8b6d70b..a36051b 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -331,7 +331,7 @@ sort__cpu_cmp(struct hist_entry *left, struct hist_entry *right)
static int hist_entry__cpu_snprintf(struct hist_entry *self, char *bf,
size_t size, unsigned int width)
{
- return repsep_snprintf(bf, size, "%-*d", width, self->cpu);
+ return repsep_snprintf(bf, size, "%*d", width, self->cpu);
}
struct sort_entry sort_cpu = {
--
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