diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
| -rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 70de8f6b3aee..11a8a447a3af 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <errno.h> | 10 | #include <errno.h> |
| 11 | #include <inttypes.h> | 11 | #include <inttypes.h> |
| 12 | #include <libgen.h> | ||
| 12 | #include "util.h" | 13 | #include "util.h" |
| 13 | #include "ui/ui.h" | 14 | #include "ui/ui.h" |
| 14 | #include "sort.h" | 15 | #include "sort.h" |
| @@ -16,6 +17,7 @@ | |||
| 16 | #include "color.h" | 17 | #include "color.h" |
| 17 | #include "config.h" | 18 | #include "config.h" |
| 18 | #include "cache.h" | 19 | #include "cache.h" |
| 20 | #include "map.h" | ||
| 19 | #include "symbol.h" | 21 | #include "symbol.h" |
| 20 | #include "units.h" | 22 | #include "units.h" |
| 21 | #include "debug.h" | 23 | #include "debug.h" |
| @@ -1889,6 +1891,7 @@ int symbol__annotate(struct symbol *sym, struct map *map, | |||
| 1889 | struct annotation_options *options, | 1891 | struct annotation_options *options, |
| 1890 | struct arch **parch) | 1892 | struct arch **parch) |
| 1891 | { | 1893 | { |
| 1894 | struct annotation *notes = symbol__annotation(sym); | ||
| 1892 | struct annotate_args args = { | 1895 | struct annotate_args args = { |
| 1893 | .privsize = privsize, | 1896 | .privsize = privsize, |
| 1894 | .evsel = evsel, | 1897 | .evsel = evsel, |
| @@ -1919,6 +1922,7 @@ int symbol__annotate(struct symbol *sym, struct map *map, | |||
| 1919 | 1922 | ||
| 1920 | args.ms.map = map; | 1923 | args.ms.map = map; |
| 1921 | args.ms.sym = sym; | 1924 | args.ms.sym = sym; |
| 1925 | notes->start = map__rip_2objdump(map, sym->start); | ||
| 1922 | 1926 | ||
| 1923 | return symbol__disassemble(sym, &args); | 1927 | return symbol__disassemble(sym, &args); |
| 1924 | } | 1928 | } |
| @@ -2794,8 +2798,6 @@ int symbol__annotate2(struct symbol *sym, struct map *map, struct perf_evsel *ev | |||
| 2794 | 2798 | ||
| 2795 | symbol__calc_percent(sym, evsel); | 2799 | symbol__calc_percent(sym, evsel); |
| 2796 | 2800 | ||
| 2797 | notes->start = map__rip_2objdump(map, sym->start); | ||
| 2798 | |||
| 2799 | annotation__set_offsets(notes, size); | 2801 | annotation__set_offsets(notes, size); |
| 2800 | annotation__mark_jump_targets(notes, sym); | 2802 | annotation__mark_jump_targets(notes, sym); |
| 2801 | annotation__compute_ipc(notes, size); | 2803 | annotation__compute_ipc(notes, size); |
