[PATCH 0/2] perf cs-etm: Fix bogus branch samples

From: Leo Yan

Date: Mon Jul 13 2026 - 14:00:50 EST


This series fixes the bogus branch samples in the CoreSight ETM trace.

When an interrupt occurs immediately after an untaken branch, the
decoder incorrectly synthesizes a branch sample for that branch.
The first patch fixes this issue.

The second patch consolidate the branch check so make sure the flush
flow to apply the same check to avoid generate bogus samples.

The series has been verified on Orion6 board.

Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
Leo Yan (2):
perf cs-etm: Avoid bogus branch samples before async exceptions
perf cs-etm: Centralize branch sample checks

tools/perf/util/cs-etm.c | 44 ++++++++++++++++++++------------------------
1 file changed, 20 insertions(+), 24 deletions(-)
---
base-commit: ef3af1df4f3372bd8ad47619452a283048b3bc8d
change-id: 20260713-perf_cs_etm_fix_non_taken-5b4d7f73f41e

Best regards,
--
Leo Yan <leo.yan@xxxxxxx>