Skip to content

Commit ad106a2

Browse files
ahunter6acmel
authored andcommitted
perf intel-pt: Fix sync state when a PSB (synchronization) packet is found
When syncing, it may be that branch packet generation is not enabled at that point, in which case there will not immediately be a control-flow packet, so some packets before a control flow packet turns up, get ignored. However, the decoder is in sync as soon as a PSB is found, so the state should be set accordingly. Fixes: f4aa081 ("perf tools: Add Intel PT decoder") Signed-off-by: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: [email protected] # v5.15+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 057ae59 commit ad106a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3608,7 +3608,7 @@ static int intel_pt_sync(struct intel_pt_decoder *decoder)
36083608
}
36093609

36103610
decoder->have_last_ip = true;
3611-
decoder->pkt_state = INTEL_PT_STATE_NO_IP;
3611+
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
36123612

36133613
err = intel_pt_walk_psb(decoder);
36143614
if (err)

0 commit comments

Comments
 (0)