From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: Athira Rajeev <atrajeev@linux.ibm.com>,
acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
irogers@google.com, namhyung@kernel.org
Cc: linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
maddy@linux.ibm.com, kjain@linux.ibm.com,
disgoel@linux.vnet.ibm.com, hbathini@linux.vnet.ibm.com,
Aditya.Bodkhe1@ibm.com, Tejas.Manhas1@ibm.com
Subject: Re: [PATCH 2/2] tools/perf/powerpc: Use return code from disasm_line__parse
Date: Wed, 5 Mar 2025 17:22:20 +0530 [thread overview]
Message-ID: <569fed73-20f7-4f54-bcdd-67fa9357aa1d@linux.ibm.com> (raw)
In-Reply-To: <20250304154114.62093-2-atrajeev@linux.ibm.com>
I was able to reproduce the issue without this patch.
Applied this patch on next-20250227 kernel and tested the patch and
issue is fixed.
Please add below tag.
Tested-By: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
On 04/03/25 9:11 pm, Athira Rajeev wrote:
> In disasm_line__parse_powerpc() , return code from function
> disasm_line__parse() is ignored. This will result in bad results
> if the disasm_line__parse fails to disasm the line. Use
> the return code to fix this.
>
> Signed-off-by: Athira Rajeev <atrajeev@linux.ibm.com>
> ---
> tools/perf/util/disasm.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
> index a53e8c4e5bca..8f0eb56c6fc6 100644
> --- a/tools/perf/util/disasm.c
> +++ b/tools/perf/util/disasm.c
> @@ -976,6 +976,7 @@ static int disasm_line__parse_powerpc(struct disasm_line *dl, struct annotate_ar
> char *tmp_raw_insn, *name_raw_insn = skip_spaces(line);
> char *name = skip_spaces(name_raw_insn + RAW_BYTES);
> int disasm = 0;
> + int ret = 0;
>
> if (args->options->disassembler_used)
> disasm = 1;
> @@ -984,7 +985,7 @@ static int disasm_line__parse_powerpc(struct disasm_line *dl, struct annotate_ar
> return -1;
>
> if (disasm)
> - disasm_line__parse(name, namep, rawp);
> + ret = disasm_line__parse(name, namep, rawp);
> else
> *namep = "";
>
> @@ -998,7 +999,7 @@ static int disasm_line__parse_powerpc(struct disasm_line *dl, struct annotate_ar
> if (disasm)
> dl->raw.raw_insn = be32_to_cpu(dl->raw.raw_insn);
>
> - return 0;
> + return ret;
> }
>
> static void annotation_line__init(struct annotation_line *al,
next prev parent reply other threads:[~2025-03-05 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 15:41 [PATCH 1/2] tools/perf: Add field to annotation options to determine disassembler used Athira Rajeev
2025-03-04 15:41 ` [PATCH 2/2] tools/perf/powerpc: Use return code from disasm_line__parse Athira Rajeev
2025-03-05 11:52 ` Venkat Rao Bagalkote [this message]
2025-03-05 11:57 ` [PATCH 1/2] tools/perf: Add field to annotation options to determine disassembler used Venkat Rao Bagalkote
2025-03-07 18:09 ` Namhyung Kim
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=569fed73-20f7-4f54-bcdd-67fa9357aa1d@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=Aditya.Bodkhe1@ibm.com \
--cc=Tejas.Manhas1@ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=atrajeev@linux.ibm.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=namhyung@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 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).