All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"acme@kernel.org" <acme@kernel.org>
Subject: Re: [PATCH] perf annotate: Fix build on 32 bit for BPF annotation
Date: Wed, 3 Apr 2019 21:34:02 +0000	[thread overview]
Message-ID: <ABAEFCEA-E8C6-4246-B109-6D6A12AAB75B@fb.com> (raw)
In-Reply-To: <20190403194452.10845-1-cascardo@canonical.com>



> On Apr 3, 2019, at 12:44 PM, Thadeu Lima de Souza Cascardo <cascardo@canonical.com> wrote:
> 
> 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.
> 
> Fixes: 6987561c9e86 ("perf annotate: Enable annotation of BPF programs")
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>

Acked-by: Song Liu <songliubraving@fb.com>

Thanks for the fix!
Song

> ---
> tools/perf/util/annotate.c | 8 ++++----
> 1 file 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,
> 	if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO)
> 		return -1;
> 
> -	pr_debug("%s: handling sym %s addr %lx len %lx\n", __func__,
> -		 sym->name, sym->start, sym->end - sym->start);
> +	pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__,
> +		  sym->name, sym->start, sym->end - sym->start);
> 
> 	memset(tpath, 0, sizeof(tpath));
> 	perf_exe(tpath, sizeof(tpath));
> @@ -1740,7 +1740,7 @@ static int symbol__disassemble_bpf(struct symbol *sym,
> 	info_linear = info_node->info_linear;
> 	sub_id = dso->bpf_prog.sub_id;
> 
> -	info.buffer = (void *)(info_linear->info.jited_prog_insns);
> +	info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns);
> 	info.buffer_length = info_linear->info.jited_prog_len;
> 
> 	if (info_linear->info.nr_line_info)
> @@ -1776,7 +1776,7 @@ static int symbol__disassemble_bpf(struct symbol *sym,
> 		const char *srcline;
> 		u64 addr;
> 
> -		addr = pc + ((u64 *)(info_linear->info.jited_ksyms))[sub_id];
> +		addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id];
> 		count = disassemble(pc, &info);
> 
> 		if (prog_linfo)
> -- 
> 2.20.1
> 


  reply	other threads:[~2019-04-03 21:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 19:44 [PATCH] perf annotate: Fix build on 32 bit for BPF annotation Thadeu Lima de Souza Cascardo
2019-04-03 21:34 ` Song Liu [this message]
2019-04-23 14:58   ` PING: " Thadeu Lima de Souza Cascardo
2019-04-23 15:09     ` Arnaldo Carvalho de Melo
2019-05-03  5:53 ` [tip:perf/urgent] " tip-bot for Thadeu Lima de Souza Cascardo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ABAEFCEA-E8C6-4246-B109-6D6A12AAB75B@fb.com \
    --to=songliubraving@fb.com \
    --cc=acme@kernel.org \
    --cc=cascardo@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.