diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index ca577658e8902aacd51413d507f4a848344b29d7..7b5e15cc6b7174a27f8c48d3122bef218b128b4b 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -1005,7 +1005,7 @@ static int cs_etm__flush(struct cs_etm_queue *etmq) } swap_packet: - if (etmq->etm->synth_opts.last_branch) { + if (etm->sample_branches || etm->synth_opts.last_branch) { /* * Swap PACKET with PREV_PACKET: PACKET becomes PREV_PACKET for * the next incoming packet.