linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org,
	Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/3] perf annotate-data: Fix missing constant copy
Date: Wed, 21 Aug 2024 11:41:38 -0300	[thread overview]
Message-ID: <ZsX8omIZDgQyUkwU@x1> (raw)
In-Reply-To: <20240821065408.285548-1-namhyung@kernel.org>

On Tue, Aug 20, 2024 at 11:54:06PM -0700, Namhyung Kim wrote:
> I found it missed to copy the immediate constant when it moves the
> register value.  This could result in a wrong type inference since the
> address for the per-cpu variable would be 0 always.
> 
> Fixes: eb9190afaed6 ("perf annotate-data: Handle ADD instructions")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Thanks, applied the series.

- Arnaldo

> ---
>  tools/perf/arch/x86/annotate/instructions.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
> index 7b7d462c6c6b..88b5bcf2116f 100644
> --- a/tools/perf/arch/x86/annotate/instructions.c
> +++ b/tools/perf/arch/x86/annotate/instructions.c
> @@ -382,6 +382,7 @@ static void update_insn_state_x86(struct type_state *state,
>  
>  		tsr->type = state->regs[src->reg1].type;
>  		tsr->kind = state->regs[src->reg1].kind;
> +		tsr->imm_value = state->regs[src->reg1].imm_value;
>  		tsr->ok = true;
>  
>  		pr_debug_dtp("mov [%x] reg%d -> reg%d",
> -- 
> 2.46.0.184.g6999bdac58-goog

      parent reply	other threads:[~2024-08-21 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21  6:54 [PATCH 1/3] perf annotate-data: Fix missing constant copy Namhyung Kim
2024-08-21  6:54 ` [PATCH 2/3] perf annotate-data: Prefer struct/union over base type Namhyung Kim
2024-08-21  6:54 ` [PATCH 3/3] perf annotate-data: Fix percpu pointer check Namhyung Kim
2024-08-21 14:41 ` Arnaldo Carvalho de Melo [this message]

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=ZsX8omIZDgQyUkwU@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).