diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-12 12:40:52 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-12 12:40:52 -0400 |
| commit | 7d5b12f5a01d338d23874c7c242a74813a8848b2 (patch) | |
| tree | 4a92cb34943d75a8b6c7c8049c942ebff7245a9d /tools/perf | |
| parent | c46219ac34f0f365bac700ca6a10ef979c643233 (diff) | |
perf annotate browser: Count the numbers of jump sources to a target
Instead of simply marking an offset as a jump target. So that we can
implement a new feature: showing "jumpy" targets, I.e. addresses that
lots of places jump to.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
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-vc7b0u5yxgrubig0q61ayhxf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/ui/browsers/annotate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 06367c1df720..446362677840 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
| @@ -16,7 +16,7 @@ struct browser_disasm_line { | |||
| 16 | double percent; | 16 | double percent; |
| 17 | u32 idx; | 17 | u32 idx; |
| 18 | int idx_asm; | 18 | int idx_asm; |
| 19 | bool jump_target; | 19 | int jump_sources; |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | struct annotate_browser { | 22 | struct annotate_browser { |
| @@ -98,7 +98,7 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro | |||
| 98 | if (!ab->use_offset) { | 98 | if (!ab->use_offset) { |
| 99 | printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr); | 99 | printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr); |
| 100 | } else { | 100 | } else { |
| 101 | if (bdl->jump_target) { | 101 | if (bdl->jump_sources) { |
| 102 | printed = scnprintf(bf, sizeof(bf), "%*" PRIx64 ": ", | 102 | printed = scnprintf(bf, sizeof(bf), "%*" PRIx64 ": ", |
| 103 | ab->addr_width, addr); | 103 | ab->addr_width, addr); |
| 104 | } else { | 104 | } else { |
| @@ -707,7 +707,7 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser | |||
| 707 | continue; | 707 | continue; |
| 708 | 708 | ||
| 709 | bdlt = disasm_line__browser(dlt); | 709 | bdlt = disasm_line__browser(dlt); |
| 710 | bdlt->jump_target = true; | 710 | ++bdlt->jump_sources; |
| 711 | } | 711 | } |
| 712 | 712 | ||
| 713 | } | 713 | } |
