Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf intel-pt: Fix async branch flags

Ensure PERF_IP_FLAG_ASYNC is set always for asynchronous branches (i.e.
interrupts etc).

Fixes: 90e457f7be08 ("perf tools: Add Intel PT support")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230928072953.19369-1-adrian.hunter@intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Adrian Hunter and committed by
Namhyung Kim
f2d87895 b1f05622

+2
+2
tools/perf/util/intel-pt.c
··· 1512 1512 } else if (ptq->state->flags & INTEL_PT_ASYNC) { 1513 1513 if (!ptq->state->to_ip) 1514 1514 ptq->flags = PERF_IP_FLAG_BRANCH | 1515 + PERF_IP_FLAG_ASYNC | 1515 1516 PERF_IP_FLAG_TRACE_END; 1516 1517 else if (ptq->state->from_nr && !ptq->state->to_nr) 1517 1518 ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | 1519 + PERF_IP_FLAG_ASYNC | 1518 1520 PERF_IP_FLAG_VMEXIT; 1519 1521 else 1520 1522 ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |