Lines Matching full:decoder
18 #include "cs-etm-decoder.h"
51 struct cs_etm_decoder *decoder = (struct cs_etm_decoder *) context; in cs_etm_decoder__mem_access() local
53 return decoder->mem_access(decoder->data, trace_chan_id, in cs_etm_decoder__mem_access()
57 int cs_etm_decoder__add_mem_access_cb(struct cs_etm_decoder *decoder, in cs_etm_decoder__add_mem_access_cb() argument
61 decoder->mem_access = cb_func; in cs_etm_decoder__add_mem_access_cb()
63 if (ocsd_dt_add_callback_trcid_mem_acc(decoder->dcd_tree, start, end, in cs_etm_decoder__add_mem_access_cb()
66 decoder)) in cs_etm_decoder__add_mem_access_cb()
72 int cs_etm_decoder__reset(struct cs_etm_decoder *decoder) in cs_etm_decoder__reset() argument
76 decoder->prev_return = OCSD_RESP_CONT; in cs_etm_decoder__reset()
77 decoder->suppress_printing = true; in cs_etm_decoder__reset()
78 dp_ret = ocsd_dt_process_data(decoder->dcd_tree, OCSD_OP_RESET, in cs_etm_decoder__reset()
80 decoder->suppress_printing = false; in cs_etm_decoder__reset()
179 const struct cs_etm_decoder *decoder = p_context; in cs_etm_decoder__print_str_cb() local
181 if (p_context && str_len && !decoder->suppress_printing) in cs_etm_decoder__print_str_cb()
182 decoder->packet_printer(msg); in cs_etm_decoder__print_str_cb()
187 struct cs_etm_decoder *decoder) in cs_etm_decoder__init_def_logger_printing() argument
194 decoder->packet_printer = d_params->packet_printer; in cs_etm_decoder__init_def_logger_printing()
213 ret = ocsd_def_errlog_set_strprint_cb(decoder->dcd_tree, in cs_etm_decoder__init_def_logger_printing()
214 (void *)decoder, in cs_etm_decoder__init_def_logger_printing()
225 struct cs_etm_decoder *decoder) in cs_etm_decoder__init_raw_frame_logging() argument
240 ocsd_def_errlog_set_strprint_cb(decoder->dcd_tree, in cs_etm_decoder__init_raw_frame_logging()
241 (void *)decoder, in cs_etm_decoder__init_raw_frame_logging()
245 ocsd_dt_set_raw_frame_printer(decoder->dcd_tree, in cs_etm_decoder__init_raw_frame_logging()
253 struct cs_etm_decoder *decoder __maybe_unused) in cs_etm_decoder__init_raw_frame_logging()
295 * hence asking the decoder to keep decoding rather than stopping. in cs_etm_decoder__do_hard_timestamp()
558 struct cs_etm_decoder *decoder = (struct cs_etm_decoder *) context; in cs_etm_decoder__gen_trace_elem_printer() local
559 struct cs_etm_queue *etmq = decoder->data; in cs_etm_decoder__gen_trace_elem_printer()
617 struct cs_etm_decoder *decoder) in cs_etm_decoder__create_etm_decoder() argument
629 decoder->decoder_name = (t_params->protocol == CS_ETM_PROTO_ETMV3) ? in cs_etm_decoder__create_etm_decoder()
636 decoder->decoder_name = OCSD_BUILTIN_DCD_ETMV4I; in cs_etm_decoder__create_etm_decoder()
641 decoder->decoder_name = OCSD_BUILTIN_DCD_ETE; in cs_etm_decoder__create_etm_decoder()
649 if (ocsd_dt_create_decoder(decoder->dcd_tree, in cs_etm_decoder__create_etm_decoder()
650 decoder->decoder_name, in cs_etm_decoder__create_etm_decoder()
655 if (ocsd_dt_set_gen_elem_outfn(decoder->dcd_tree, in cs_etm_decoder__create_etm_decoder()
657 decoder)) in cs_etm_decoder__create_etm_decoder()
662 if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder->decoder_name, in cs_etm_decoder__create_etm_decoder()
667 if (ocsd_dt_set_pkt_protocol_printer(decoder->dcd_tree, csid, 0)) in cs_etm_decoder__create_etm_decoder()
680 struct cs_etm_decoder *decoder; in cs_etm_decoder__new() local
688 decoder = zalloc(sizeof(*decoder)); in cs_etm_decoder__new()
690 if (!decoder) in cs_etm_decoder__new()
693 decoder->data = d_params->data; in cs_etm_decoder__new()
694 decoder->prev_return = OCSD_RESP_CONT; in cs_etm_decoder__new()
709 decoder->dcd_tree = ocsd_create_dcd_tree(format, flags); in cs_etm_decoder__new()
711 if (decoder->dcd_tree == 0) in cs_etm_decoder__new()
715 ret = cs_etm_decoder__init_def_logger_printing(d_params, decoder); in cs_etm_decoder__new()
720 cs_etm_decoder__init_raw_frame_logging(d_params, decoder); in cs_etm_decoder__new()
725 decoder); in cs_etm_decoder__new()
730 return decoder; in cs_etm_decoder__new()
733 cs_etm_decoder__free(decoder); in cs_etm_decoder__new()
737 int cs_etm_decoder__process_data_block(struct cs_etm_decoder *decoder, in cs_etm_decoder__process_data_block() argument
743 ocsd_datapath_resp_t prev_return = decoder->prev_return; in cs_etm_decoder__process_data_block()
749 cur = ocsd_dt_process_data(decoder->dcd_tree, in cs_etm_decoder__process_data_block()
756 cur = ocsd_dt_process_data(decoder->dcd_tree, in cs_etm_decoder__process_data_block()
779 decoder->prev_return = cur; in cs_etm_decoder__process_data_block()
785 void cs_etm_decoder__free(struct cs_etm_decoder *decoder) in cs_etm_decoder__free() argument
787 if (!decoder) in cs_etm_decoder__free()
790 ocsd_destroy_dcd_tree(decoder->dcd_tree); in cs_etm_decoder__free()
791 decoder->dcd_tree = NULL; in cs_etm_decoder__free()
792 free(decoder); in cs_etm_decoder__free()
795 const char *cs_etm_decoder__get_name(struct cs_etm_decoder *decoder) in cs_etm_decoder__get_name() argument
797 return decoder->decoder_name; in cs_etm_decoder__get_name()