diff options
| author | Thadeu Lima de Souza Cascardo <cascardo@canonical.com> | 2019-04-03 15:44:52 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-05-02 16:00:19 -0400 |
| commit | 01e985e900d3e602e9b1a55372a8e5274012a417 (patch) | |
| tree | 02b9332936de2921854adc9f54d1ebb092db8a4d | |
| parent | 24e45b49eef07814e0507507161cd06f15b8ee1b (diff) | |
perf annotate: Fix build on 32 bit for BPF annotation
Commit 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") adds
support for BPF programs annotations but the new code does not build on 32-bit.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Song Liu <songliubraving@fb.com>
Fixes: 6987561c9e86 ("perf annotate: Enable annotation of BPF programs")
Link: http://lkml.kernel.org/r/20190403194452.10845-1-cascardo@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/perf/util/annotate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index c8b01176c9e1..09762985c713 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
| @@ -1714,8 +1714,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, | |||
| 1714 | if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO) | 1714 | if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO) |
| 1715 | return -1; | 1715 | return -1; |
| 1716 | 1716 | ||
| 1717 | pr_debug("%s: handling sym %s addr %lx len %lx\n", __func__, | 1717 | pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__, |
| 1718 | sym->name, sym->start, sym->end - sym->start); | 1718 | sym->name, sym->start, sym->end - sym->start); |
| 1719 | 1719 | ||
| 1720 | memset(tpath, 0, sizeof(tpath)); | 1720 | memset(tpath, 0, sizeof(tpath)); |
| 1721 | perf_exe(tpath, sizeof(tpath)); | 1721 | perf_exe(tpath, sizeof(tpath)); |
| @@ -1740,7 +1740,7 @@ static int symbol__disassemble_bpf(struct symbol *sym, | |||
| 1740 | info_linear = info_node->info_linear; | 1740 | info_linear = info_node->info_linear; |
| 1741 | sub_id = dso->bpf_prog.sub_id; | 1741 | sub_id = dso->bpf_prog.sub_id; |
| 1742 | 1742 | ||
| 1743 | info.buffer = (void *)(info_linear->info.jited_prog_insns); | 1743 | info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns); |
| 1744 | info.buffer_length = info_linear->info.jited_prog_len; | 1744 | info.buffer_length = info_linear->info.jited_prog_len; |
| 1745 | 1745 | ||
| 1746 | if (info_linear->info.nr_line_info) | 1746 | if (info_linear->info.nr_line_info) |
| @@ -1776,7 +1776,7 @@ static int symbol__disassemble_bpf(struct symbol *sym, | |||
| 1776 | const char *srcline; | 1776 | const char *srcline; |
| 1777 | u64 addr; | 1777 | u64 addr; |
| 1778 | 1778 | ||
| 1779 | addr = pc + ((u64 *)(info_linear->info.jited_ksyms))[sub_id]; | 1779 | addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id]; |
| 1780 | count = disassemble(pc, &info); | 1780 | count = disassemble(pc, &info); |
| 1781 | 1781 | ||
| 1782 | if (prog_linfo) | 1782 | if (prog_linfo) |
