diff options
| -rw-r--r-- | tools/perf/util/cs-etm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 110804936fc3..7777cfc1ad8c 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c | |||
| @@ -981,7 +981,6 @@ static int cs_etm__sample(struct cs_etm_queue *etmq) | |||
| 981 | * PREV_PACKET is a branch. | 981 | * PREV_PACKET is a branch. |
| 982 | */ | 982 | */ |
| 983 | if (etm->synth_opts.last_branch && | 983 | if (etm->synth_opts.last_branch && |
| 984 | etmq->prev_packet && | ||
| 985 | etmq->prev_packet->sample_type == CS_ETM_RANGE && | 984 | etmq->prev_packet->sample_type == CS_ETM_RANGE && |
| 986 | etmq->prev_packet->last_instr_taken_branch) | 985 | etmq->prev_packet->last_instr_taken_branch) |
| 987 | cs_etm__update_last_branch_rb(etmq); | 986 | cs_etm__update_last_branch_rb(etmq); |
| @@ -1014,7 +1013,7 @@ static int cs_etm__sample(struct cs_etm_queue *etmq) | |||
| 1014 | etmq->period_instructions = instrs_over; | 1013 | etmq->period_instructions = instrs_over; |
| 1015 | } | 1014 | } |
| 1016 | 1015 | ||
| 1017 | if (etm->sample_branches && etmq->prev_packet) { | 1016 | if (etm->sample_branches) { |
| 1018 | bool generate_sample = false; | 1017 | bool generate_sample = false; |
| 1019 | 1018 | ||
| 1020 | /* Generate sample for tracing on packet */ | 1019 | /* Generate sample for tracing on packet */ |
| @@ -1071,9 +1070,6 @@ static int cs_etm__flush(struct cs_etm_queue *etmq) | |||
| 1071 | struct cs_etm_auxtrace *etm = etmq->etm; | 1070 | struct cs_etm_auxtrace *etm = etmq->etm; |
| 1072 | struct cs_etm_packet *tmp; | 1071 | struct cs_etm_packet *tmp; |
| 1073 | 1072 | ||
| 1074 | if (!etmq->prev_packet) | ||
| 1075 | return 0; | ||
| 1076 | |||
| 1077 | /* Handle start tracing packet */ | 1073 | /* Handle start tracing packet */ |
| 1078 | if (etmq->prev_packet->sample_type == CS_ETM_EMPTY) | 1074 | if (etmq->prev_packet->sample_type == CS_ETM_EMPTY) |
| 1079 | goto swap_packet; | 1075 | goto swap_packet; |
