Re: [PATCH v3 08/18] perf cs-etm: Use instruction length in disassembly script

From: Leo Yan

Date: Wed Nov 04 2026 - 12:24:51 EST


On Mon, Nov 02, 2026 at 12:15:22PM +0000, James Clark wrote:
> The disassembly script adds four bytes to each branch sample's IP to
> include the final instruction in the range. For an exception sample
> whose IP identifies a faulting or interrupted instruction, this
> incorrectly includes an instruction that did not execute.
>
> Use the decoder-supplied insn_len to calculate the exclusive end
> address. This preserves zero-length exception entries, includes executed
> syscall instructions and also uses the decoded size for Thumb
> instructions.
>
> Signed-off-by: James Clark <james.clark@xxxxxxxxxx>

Reviewed-by: Leo Yan <leo.yan@xxxxxxx>