perf intel-pt: Fix async branch flags
Adrian Hunter
reviewerPATCH 1/1 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")
Signed-off-by Adrian Hunter <[email protected]>
--- tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/intel-pt.c +2 -0
@@ -1512,9 +1512,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) }else if (ptq->state->flags &INTEL_PT_ASYNC ) {if (!ptq->state->to_ip) ptq->flags =PERF_IP_FLAG_BRANCH | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_TRACE_END ;else if (ptq->state->from_nr && !ptq->state->to_nr) ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_CALL | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_VMEXIT ;else ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL |
Signature · 1 line
2.34.1
Quoted 7 lines · Adrian Hunter
Ensure
PERF_IP_FLAG_ASYNCis set always for asynchronous branches (i.e. interrupts etc).Fixes 90e457f7be08 ("perf tools: Add Intel PT support")Signed-off-by Adrian Hunter <[email protected]>
Acked-by Namhyung Kim <[email protected]>
Thanks,
Namhyung
Quoted 24 lines
--- tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+)tools/perf/util/intel-pt.c +2
-1@@ -1512,9 +1512,11 @@ static void intel_pt_sample_flags(struct intel_pt_queue *ptq) }else if (ptq->state->flags &INTEL_PT_ASYNC ) {if (!ptq->state->to_ip) ptq->flags =PERF_IP_FLAG_BRANCH | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_TRACE_END ;else if (ptq->state->from_nr && !ptq->state->to_nr) ptq->flags =PERF_IP_FLAG_BRANCH |PERF_IP_FLAG_CALL | +PERF_IP_FLAG_ASYNC |PERF_IP_FLAG_VMEXIT ;else ptq->flags = PERF_IP_FLAG_BRANCH | PERF_IP_FLAG_CALL | --2.34.1
Quoted 11 lines · Namhyung Kim
Quoted 7 lines · Adrian Hunter
Ensure
PERF_IP_FLAG_ASYNCis set always for asynchronous branches (i.e. interrupts etc).Fixes 90e457f7be08 ("perf tools: Add Intel PT support")Signed-off-by Adrian Hunter <[email protected]>Acked-by Namhyung Kim <[email protected]>
Applied to perf-tools-next, thanks!