diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-19 14:07:46 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-19 16:08:24 -0400 |
commit | 8bf39cb81bdad01ad0d830e8c3639b9e8f552d57 (patch) | |
tree | 8da1afa5baa7ec6f87e7b593a4ffc09a918e48e3 /tools | |
parent | 61e04b332e9417720c331eb39c96a4ccb1aa0460 (diff) |
perf annotate browser: Make lines more compact
But now we have a lot of space on the right...
Perhaps we should add a "Trending on G+" gizmo... ;-)
Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
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-igoynvtg2wc6mdfinc69prp6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index c5ab21c50a74..34b86ea3e54d 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
@@ -82,11 +82,11 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro | |||
82 | ui_browser__set_color(self, HE_COLORSET_CODE); | 82 | ui_browser__set_color(self, HE_COLORSET_CODE); |
83 | 83 | ||
84 | if (!*dl->line) | 84 | if (!*dl->line) |
85 | slsmg_write_nstring(" ", width - 18); | 85 | slsmg_write_nstring(" ", width - 10); |
86 | else if (dl->offset == -1) | 86 | else if (dl->offset == -1) |
87 | slsmg_write_nstring(dl->line, width - 18); | 87 | slsmg_write_nstring(dl->line, width - 10); |
88 | else { | 88 | else { |
89 | char bf[256], *line = dl->line; | 89 | char bf[256]; |
90 | u64 addr = dl->offset; | 90 | u64 addr = dl->offset; |
91 | int printed, color = -1; | 91 | int printed, color = -1; |
92 | 92 | ||
@@ -114,12 +114,12 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro | |||
114 | dl->ins->ops->scnprintf(dl->ins, bf, sizeof(bf), | 114 | dl->ins->ops->scnprintf(dl->ins, bf, sizeof(bf), |
115 | !ab->use_offset ? dl->operands : NULL, | 115 | !ab->use_offset ? dl->operands : NULL, |
116 | dl->target); | 116 | dl->target); |
117 | line = bf; | 117 | slsmg_write_nstring(" ", 2); |
118 | slsmg_write_nstring(" ", 7); | 118 | printed += 2; |
119 | printed += 7; | 119 | } else |
120 | } | 120 | scnprintf(bf, sizeof(bf), " %-6.6s %s", dl->name, dl->operands); |
121 | 121 | ||
122 | slsmg_write_nstring(line, width - 18 - printed); | 122 | slsmg_write_nstring(bf, width - 10 - printed); |
123 | } | 123 | } |
124 | 124 | ||
125 | if (current_entry) | 125 | if (current_entry) |
@@ -653,6 +653,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx, | |||
653 | .priv = &ms, | 653 | .priv = &ms, |
654 | .use_navkeypressed = true, | 654 | .use_navkeypressed = true, |
655 | }, | 655 | }, |
656 | .use_offset = true, | ||
656 | }; | 657 | }; |
657 | int ret = -1; | 658 | int ret = -1; |
658 | 659 | ||