Previously when the incorrect binary was used for decode, Perf would silently continue to generate incorrect samples. With OpenCSD 1.5.4 we can enable consistency checks that do a best effort to detect a mismatch in the image. When one is detected a warning is printed and sample generation stops until the trace resynchronizes with a good part of the image.
Unified · Split
| @@ -685,9 +685,14 @@ cs_etm_decoder__create_etm_decoder(struct cs_etm_decoder_params *d_params, · 684 unmodified lines | |||
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | if (d_params->operation == CS_ETM_OPERATION_DECODE) { | 687 | if (d_params->operation == CS_ETM_OPERATION_DECODE) { |
| 688 | int decode_flags = OCSD_CREATE_FLG_FULL_DECODER; | ||
| 689 | #ifdef OCSD_OPFLG_N_UNCOND_DIR_BR_CHK | ||
| 690 | decode_flags |= OCSD_OPFLG_N_UNCOND_DIR_BR_CHK | OCSD_OPFLG_CHK_RANGE_CONTINUE | | ||
| 691 | ETM4_OPFLG_PKTDEC_AA64_OPCODE_CHK; | ||
| 692 | #endif | ||
| 688 | if (ocsd_dt_create_decoder(decoder->dcd_tree, | 693 | if (ocsd_dt_create_decoder(decoder->dcd_tree, |
| 689 | decoder->decoder_name, | 694 | decoder->decoder_name, |
| 690 | OCSD_CREATE_FLG_FULL_DECODER, | 695 | decode_flags, |
| 691 | trace_config, &csid)) | 696 | trace_config, &csid)) |
| 692 | return -1; | 697 | return -1; |
| 693 | 698 | ||