All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Leo Yan <leo.yan@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf python: Fix arm-cs-trace-disasm type error
Date: Mon, 28 Sep 2026 14:52:04 +0100	[thread overview]
Message-ID: <79e7cb39-b4af-4ac9-b72b-b01872603cff@linaro.org> (raw)
In-Reply-To: <20260928134642.GE14479@e132581.arm.com>



On 28/09/2026 14:46, Leo Yan wrote:
> On Mon, Sep 28, 2026 at 01:58:09PM +0100, James Clark wrote:
>> The perf sample dso_bid getter returns a string or None, matching its
>> Optional[str] annotation. Attempting to decode it as bytes causes mypy
>> to report union-attr errors, even though this was behind a conditional
>> that checked for bytes type.
>>
>> Use the string directly, retaining the fallback for an unknown build ID.
>>
>> This fixes the following build error:
>>
>>    python/arm-cs-trace-disasm.py:266: error: Item "None" of "str | None" has no attribute "decode"  [union-attr]
>>
>> Fixes: 279b402e5143 ("perf python: Port arm-cs-trace-disasm to perf module")
>> Assisted-by: Codex:GPT-6-Astra
>> Signed-off-by: James Clark <james.clark@linaro.org>
> 
> Thanks for the fix:
> 
> Reviewed-by: Leo Yan <leo.yan@arm.com>
> 
> Just curious, have you run this script and compare the result with old
> one? Seems to me, the build pass is insufficient, we should run a small
> test to ensure the result to keep same.
> 
> Thanks,
> Leo

Yep the test still passes. I assume the "if isinstance(sample.dso_bid, 
bytes)" part was just dead code.



  reply	other threads:[~2026-09-28 13:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 12:58 [PATCH] perf python: Fix arm-cs-trace-disasm type error James Clark
2026-09-28 13:01 ` sashiko-bot
2026-09-28 13:46 ` Leo Yan
2026-09-28 13:52   ` James Clark [this message]
2026-09-28 15:11     ` Ian Rogers
2026-09-28 16:29     ` Arnaldo Carvalho de Melo

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=79e7cb39-b4af-4ac9-b72b-b01872603cff@linaro.org \
    --to=james.clark@linaro.org \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=leo.yan@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --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 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.